diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-27 16:35:24 -0300 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-27 16:35:24 -0300 |
commit | 2e11f8e32109f078da424f0e9a550edd4f222079 (patch) | |
tree | bf0763fd2ffa6ce2902080ce420ab8a667309825 /railties/lib | |
parent | f5c5d21681616c6b9240792092e656d3d1af385b (diff) | |
parent | 494b62826b6257f145cce9ebbd58a1d842486621 (diff) | |
download | rails-2e11f8e32109f078da424f0e9a550edd4f222079.tar.gz rails-2e11f8e32109f078da424f0e9a550edd4f222079.tar.bz2 rails-2e11f8e32109f078da424f0e9a550edd4f222079.zip |
Merge remote-tracking branch 'origin/master'
* origin/master:
Removal of javascript related gems when creating an app
Conflicts:
railties/lib/rails/generators/app_base.rb
Diffstat (limited to 'railties/lib')
3 files changed, 9 insertions, 7 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 41d768609d..8983bd89fa 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -223,11 +223,6 @@ module Rails '>= 1.3.0', 'Use Uglifier as compressor for JavaScript assets') - if options[:skip_javascript] - gems << coffee_gemfile_entry - gems << javascript_runtime_gemfile_entry - end - gems end diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index eebe3c5bcb..68efd17067 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -129,7 +129,9 @@ module Rails end def vendor_javascripts - empty_directory_with_keep_file 'vendor/assets/javascripts' + unless options[:skip_javascript] + empty_directory_with_keep_file 'vendor/assets/javascripts' + end end def vendor_stylesheets @@ -237,6 +239,12 @@ module Rails build(:leftovers) end + def delete_js_folder_skipping_javascript + if options[:skip_javascript] + remove_dir 'app/assets/javascripts' + end + end + public_task :apply_rails_template, :run_bundle protected diff --git a/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt b/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt index c3d1578818..4cf47bd0a0 100644 --- a/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +++ b/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt @@ -4,7 +4,6 @@ <title><%= camelized %></title> <%- if options[:skip_javascript] -%> <%%= stylesheet_link_tag "application", media: "all" %> - <%%= javascript_include_tag "application" %> <%- else -%> <%%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> <%%= javascript_include_tag "application", "data-turbolinks-track" => true %> |