lib/generators/half_pipe/install_generator.rb in half-pipe-0.2.2 vs lib/generators/half_pipe/install_generator.rb in half-pipe-0.2.3
- old
+ new
@@ -18,11 +18,13 @@
comment_lines "config/application.rb", %r{sprockets/railtie}
railties_requires = File.read(File.join(self.class.source_root, "railties.rb"))
gsub_file "config/application.rb", %r{require 'rails/all'}, railties_requires
- gsub_file "app/views/layouts/application.html.erb", %r{\s*<%= javascript_include_tag "application" %>$}, ''
+ gsub_file "app/views/layouts/application.html.erb", %r{\s*<%= stylesheet_link_tag\s+"application".*%>$}, ''
+ gsub_file "app/views/layouts/application.html.erb", %r{\s*<%= javascript_include_tag\s+"application".*%>$}, ''
insert_into_file "app/views/layouts/application.html.erb", %Q{ <%= requirejs_include_tag "/scripts/application.js" %>\n }, before: "</body>"
+ insert_into_file "app/views/layouts/application.html.erb", %Q{ <%= stylesheet_link_tag "/styles/main.css" %>\n }, before: "</head>"
gsub_file "config/environments/development.rb", "config.assets.debug = true", "config.middleware.use Rack::HalfPipe"
append_to_file ".gitignore", %w(node_modules bower_components public/scripts public/styles public/images).join("\n"), force: true