Class: Suspenders::StylesheetBaseGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Suspenders::StylesheetBaseGenerator
- Defined in:
- lib/suspenders/generators/stylesheet_base_generator.rb
Instance Method Summary collapse
- #add_css_config ⇒ Object
- #add_stylesheet_gems ⇒ Object
- #install_bitters ⇒ Object
- #install_refills ⇒ Object
- #remove_prior_config ⇒ Object
Instance Method Details
#add_css_config ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/suspenders/generators/stylesheet_base_generator.rb', line 16 def add_css_config copy_file( "application.scss", "app/assets/stylesheets/application.scss", force: true, ) end |
#add_stylesheet_gems ⇒ Object
9 10 11 12 13 14 |
# File 'lib/suspenders/generators/stylesheet_base_generator.rb', line 9 def add_stylesheet_gems gem "bourbon", "~> 5.0.0.beta.7" gem "neat", "~> 2.0.0.beta.1" gem "refills", group: [:development, :test] Bundler.with_clean_env { run "bundle install" } end |
#install_bitters ⇒ Object
33 34 35 |
# File 'lib/suspenders/generators/stylesheet_base_generator.rb', line 33 def install_bitters run "bitters install --path app/assets/stylesheets" end |
#install_refills ⇒ Object
28 29 30 31 |
# File 'lib/suspenders/generators/stylesheet_base_generator.rb', line 28 def install_refills generate "refills:import", "flashes" remove_dir "app/views/refills" end |
#remove_prior_config ⇒ Object
24 25 26 |
# File 'lib/suspenders/generators/stylesheet_base_generator.rb', line 24 def remove_prior_config remove_file "app/assets/stylesheets/application.css" end |