diff --git a/buffalo/cmd/new.go b/buffalo/cmd/new.go index ff87756fe..10a04fe53 100644 --- a/buffalo/cmd/new.go +++ b/buffalo/cmd/new.go @@ -30,7 +30,7 @@ var app = newapp.Generator{ CIProvider: "none", AsWeb: true, Docker: "multi", - Bootstrap: 3, + Bootstrap: 4, } var newCmd = &cobra.Command{ diff --git a/buffalo/cmd/updater/npm.go b/buffalo/cmd/updater/npm.go index 6384cf52b..affd8d574 100644 --- a/buffalo/cmd/updater/npm.go +++ b/buffalo/cmd/updater/npm.go @@ -27,7 +27,7 @@ func PackageJSONCheck(r *Runner) error { g := newapp.Generator{ App: r.App, - Bootstrap: 3, + Bootstrap: 4, } box := webpack.TemplateBox diff --git a/buffalo/cmd/updater/webpack.go b/buffalo/cmd/updater/webpack.go index fd1a30d96..bafc390a1 100644 --- a/buffalo/cmd/updater/webpack.go +++ b/buffalo/cmd/updater/webpack.go @@ -26,7 +26,7 @@ func WebpackCheck(r *Runner) error { g := newapp.Generator{ App: r.App, - Bootstrap: 3, + Bootstrap: 4, } box := webpack.TemplateBox diff --git a/generators/assets/webpack/templates/assets/css/application.scss.tmpl b/generators/assets/webpack/templates/assets/css/application.scss.tmpl index 0c745a342..fcadbff60 100644 --- a/generators/assets/webpack/templates/assets/css/application.scss.tmpl +++ b/generators/assets/webpack/templates/assets/css/application.scss.tmpl @@ -1,7 +1,7 @@ -{{ if eq .opts.Bootstrap 4 -}} -@import "~bootstrap/scss/bootstrap.scss"; -{{ else -}} +{{ if eq .opts.Bootstrap 3 -}} @import "~bootstrap-sass/assets/stylesheets/_bootstrap-sprockets.scss"; @import "~bootstrap-sass/assets/stylesheets/_bootstrap.scss"; +{{ else -}} +@import "~bootstrap/scss/bootstrap.scss"; {{ end -}} @import "~font-awesome/css/font-awesome.css"; diff --git a/generators/assets/webpack/templates/assets/js/application.js.tmpl b/generators/assets/webpack/templates/assets/js/application.js.tmpl index ee067a5bd..486b5eb44 100644 --- a/generators/assets/webpack/templates/assets/js/application.js.tmpl +++ b/generators/assets/webpack/templates/assets/js/application.js.tmpl @@ -1,8 +1,8 @@ require("expose-loader?$!expose-loader?jQuery!jquery"); -{{ if eq .opts.Bootstrap 4 -}} -require("bootstrap/dist/js/bootstrap.bundle.js"); -{{ else -}} +{{ if eq .opts.Bootstrap 3 -}} require("bootstrap-sass/assets/javascripts/bootstrap.js"); +{{ else -}} +require("bootstrap/dist/js/bootstrap.bundle.js"); {{ end -}} $(() => { diff --git a/generators/assets/webpack/templates/package.json.tmpl b/generators/assets/webpack/templates/package.json.tmpl index e28f3283d..6d1847603 100644 --- a/generators/assets/webpack/templates/package.json.tmpl +++ b/generators/assets/webpack/templates/package.json.tmpl @@ -5,10 +5,10 @@ "license": "MIT", "repository": "github.com/gobuffalo/buffalo", "dependencies": { - {{ if eq .opts.Bootstrap 4 -}} - "bootstrap": "4.0.0", - {{ else -}} + {{ if eq .opts.Bootstrap 3 -}} "bootstrap-sass": "~3.3.7", + {{ else -}} + "bootstrap": "4.1.0", {{ end -}} "font-awesome": "~4.7.0", "jquery": "~3.2.1", diff --git a/generators/newapp/templates/templates/application.html.tmpl b/generators/newapp/templates/templates/application.html.tmpl index 28e3e51f5..90bef899e 100644 --- a/generators/newapp/templates/templates/application.html.tmpl +++ b/generators/newapp/templates/templates/application.html.tmpl @@ -5,10 +5,10 @@