Class: Hintcss::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Hintcss::Generators::InstallGenerator
- Defined in:
- lib/hintcss-rails/generators/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_hintcss ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/hintcss-rails/generators/install_generator.rb', line 10 def add_hintcss copy_stylesheet(stylesheets_type) css_manifest = 'app/assets/stylesheets/application.css' if File.exist?(css_manifest) style_require_block = " *= require hintcss\n" insert_into_file css_manifest, style_require_block, :after => "require_self\n" else copy_file "application.css", "app/assets/stylesheets/application.css" end end |