mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add --skip-coffee generating option
Usage `rails new awesome-project --skip-coffee`
This commit is contained in:
parent
7b75ca100d
commit
ea2bf991a9
1 changed files with 6 additions and 1 deletions
|
@ -67,6 +67,9 @@ module Rails
|
|||
class_option :skip_listen, type: :boolean, default: false,
|
||||
desc: "Don't generate configuration that depends on the listen gem"
|
||||
|
||||
class_option :skip_coffee, type: :boolean, default: false,
|
||||
desc: "Don't use CoffeeScript"
|
||||
|
||||
class_option :skip_javascript, type: :boolean, aliases: '-J', default: false,
|
||||
desc: 'Skip JavaScript files'
|
||||
|
||||
|
@ -319,7 +322,9 @@ module Rails
|
|||
if options[:skip_javascript] || options[:skip_sprockets]
|
||||
[]
|
||||
else
|
||||
gems = [coffee_gemfile_entry, javascript_runtime_gemfile_entry]
|
||||
gems = [javascript_runtime_gemfile_entry]
|
||||
gems << coffee_gemfile_entry unless options[:skip_coffee]
|
||||
|
||||
gems << GemfileEntry.version("#{options[:javascript]}-rails", nil,
|
||||
"Use #{options[:javascript]} as the JavaScript library")
|
||||
|
||||
|
|
Loading…
Reference in a new issue