提交 1373f9bd 编写于 作者: K Kasper Timm Hansen

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"`.
上级 cfdf6e13
......@@ -33,7 +33,7 @@ def self.add_shared_options_for(name)
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 @@ def run_bundle
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册