Class: Underlay::StylesheetBaseGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Underlay::StylesheetBaseGenerator
- Defined in:
- lib/underlay/generators/stylesheet_base_generator.rb
Instance Method Summary collapse
- #add_css_config ⇒ Object
- #add_flashes_css ⇒ Object
- #install_normalize_css ⇒ Object
- #remove_prior_config ⇒ Object
Instance Method Details
#add_css_config ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/underlay/generators/stylesheet_base_generator.rb', line 12 def add_css_config copy_file( 'application.scss', 'app/assets/stylesheets/application.scss', force: true ) end |
#add_flashes_css ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/underlay/generators/stylesheet_base_generator.rb', line 20 def add_flashes_css copy_file( '_flashes.scss', 'app/assets/stylesheets/partials/_flashes.scss', force: true ) end |
#install_normalize_css ⇒ Object
32 33 34 |
# File 'lib/underlay/generators/stylesheet_base_generator.rb', line 32 def install_normalize_css run 'bin/yarn add normalize.css' end |
#remove_prior_config ⇒ Object
28 29 30 |
# File 'lib/underlay/generators/stylesheet_base_generator.rb', line 28 def remove_prior_config remove_file 'app/assets/stylesheets/application.css' end |