diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-12-12 21:10:50 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-12-12 21:10:50 +0100 |
commit | 1373f9bdcf725f75832dc7401994cc76113a8a4e (patch) | |
tree | 57c1be3ec7b5311aeb09e7ad07eab3a2990c9c55 /railties | |
parent | cfdf6e13689c67a108b1f3980f59a4e3933369c3 (diff) | |
download | rails-1373f9bdcf725f75832dc7401994cc76113a8a4e.tar.gz rails-1373f9bdcf725f75832dc7401994cc76113a8a4e.tar.bz2 rails-1373f9bdcf725f75832dc7401994cc76113a8a4e.zip |
Don't assign a default to `webpack`.
Unintentionally makes `--webpack` implied on `rails new apper`.
If passed `--webpack` Thor assigns `"webpack"` to `options[:webpack]`,
so we can check for that instead of `"base"`.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index b94630de15..15cc070e35 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -33,7 +33,7 @@ module Rails class_option :javascript, type: :string, aliases: "-j", desc: "Preconfigure for selected JavaScript library" - class_option :webpack, type: :string, default: "base", + class_option :webpack, type: :string, default: nil, desc: "Preconfigure for app-like JavaScript with Webpack" class_option :skip_yarn, type: :boolean, default: false, @@ -428,7 +428,7 @@ module Rails def run_webpack if !(webpack = options[:webpack]).nil? rails_command "webpacker:install" - rails_command "webpacker:install:#{webpack}" unless webpack == "base" + rails_command "webpacker:install:#{webpack}" unless webpack == "webpack" end end |