Skip to content

Commit

Permalink
update optional config for bootstrap loader, set bootstrap as a defau…
Browse files Browse the repository at this point in the history
…lt generator option
  • Loading branch information
yorzi committed Nov 30, 2015
1 parent 6e13d2e commit 6142e1a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/generators/react_on_rails/base_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class BaseGenerator < Rails::Generators::Base # rubocop:disable Metrics/ClassLen
# --bootstrap
class_option :bootstrap,
type: :boolean,
default: false,
default: true,
desc: "Integrate Bootstrap, initialize files and regarding configs",
aliases: "-B"

Expand Down
2 changes: 1 addition & 1 deletion lib/generators/react_on_rails/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class InstallGenerator < Rails::Generators::Base
# --bootstrap
class_option :bootstrap,
type: :boolean,
default: false,
default: true,
desc: "Integrate Bootstrap, initialize files and regarding configs",
aliases: "-B"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ config.entry.app.push(

// Webpack dev server
'webpack-dev-server/client?http://localhost:4000',
'webpack/hot/dev-server'
'webpack/hot/dev-server'<%- if options.bootstrap? -%>,

<%- if options.bootstrap? -%>
// See: https://github.com/shakacode/bootstrap-sass-loader
// We're using the bootstrap-sass loader.
,
'bootstrap-sass!./bootstrap-sass.config.js'
<%- end -%>

);

config.output = {
Expand Down

0 comments on commit 6142e1a

Please sign in to comment.