Class: Suspenders::StylesheetBaseGenerator

Inherits:
Generators::Base
  • Object
show all
Defined in:
lib/suspenders/generators/stylesheet_base_generator.rb

Instance Method Summary collapse

Methods inherited from Generators::Base

default_source_root

Methods included from Actions

#action_mailer_asset_host, #action_mailer_host, #configure_environment, #expand_json, #replace_in_file

Instance Method Details

#add_css_configObject



11
12
13
14
15
16
17
# File 'lib/suspenders/generators/stylesheet_base_generator.rb', line 11

def add_css_config
  copy_file(
    "application.scss",
    "app/assets/stylesheets/application.scss",
    force: true,
  )
end

#add_stylesheet_gemsObject



5
6
7
8
9
# File 'lib/suspenders/generators/stylesheet_base_generator.rb', line 5

def add_stylesheet_gems
  gem "bourbon", ">= 5.0.1"
  gem "neat", ">= 3.0.1"
  Bundler.with_clean_env { run "bundle install" }
end

#install_bittersObject



23
24
25
# File 'lib/suspenders/generators/stylesheet_base_generator.rb', line 23

def install_bitters
  run "bitters install --path app/assets/stylesheets"
end

#install_normalize_cssObject



27
28
29
# File 'lib/suspenders/generators/stylesheet_base_generator.rb', line 27

def install_normalize_css
  run "bin/yarn add normalize.css"
end

#remove_prior_configObject



19
20
21
# File 'lib/suspenders/generators/stylesheet_base_generator.rb', line 19

def remove_prior_config
  remove_file "app/assets/stylesheets/application.css"
end