Class: Gintonic::StylesGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/gintonic/styles/styles_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_application_cssObject



15
16
17
18
# File 'lib/generators/gintonic/styles/styles_generator.rb', line 15

def copy_application_css
  template 'application.css',
    File.join(destination_root, 'app/assets/stylesheets/application.scss')
end

#create_structureObject



4
5
6
7
8
9
10
11
12
13
# File 'lib/generators/gintonic/styles/styles_generator.rb', line 4

def create_structure
  create_file "app/assets/stylesheets/base/_3_layout.scss", ""
  create_file "app/assets/stylesheets/base/_2_typography.scss", ""
  create_file "app/assets/stylesheets/base/_1_variables.scss", ""
  create_file "app/assets/stylesheets/libs/.keep", ""
  create_file "app/assets/stylesheets/pages/.keep", ""
  create_file "app/assets/stylesheets/partials/.keep", ""
  create_file "app/assets/stylesheets/elements/.keep", ""
  create_file "app/assets/stylesheets/blocks/.keep", ""
end

#install_quite_assetsObject



20
21
22
23
24
25
26
# File 'lib/generators/gintonic/styles/styles_generator.rb', line 20

def install_quite_assets
  begin
    gem 'shut_up_assets', group: :development
  rescue Errno::ENOENT
    say_status("warning", "It seems you don't have any Gemfile. I hope you are in the dummy app.", :yellow)
  end
end