Class: Partystreusel::StyleguideGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Partystreusel::StyleguideGenerator
- Defined in:
- lib/generators/partystreusel/styleguide_generator.rb
Constant Summary collapse
- TARGET_DIR_FOR_STYLESHEETS =
'app/assets/stylesheets/'
- TARGET_DIR_FOR_STYLEGUIDE =
'app/views/styleguide'
- TARGET_DIR_FOR_PARTIALS =
'app/views/partials'
Instance Method Summary collapse
Instance Method Details
#add_route ⇒ Object
20 21 22 |
# File 'lib/generators/partystreusel/styleguide_generator.rb', line 20 def add_route inject_into_file 'config/routes.rb', " mount Partystreusel::Engine => '/'\n", before: /^end/ end |
#copy_grunticon_files ⇒ Object
24 25 26 27 28 |
# File 'lib/generators/partystreusel/styleguide_generator.rb', line 24 def copy_grunticon_files directory 'app/assets/images', 'app/assets/images' copy_file 'package.json', 'package.json' copy_file 'Gruntfile.coffee', 'Gruntfile.coffee' end |
#copy_stylesheets ⇒ Object
11 12 13 |
# File 'lib/generators/partystreusel/styleguide_generator.rb', line 11 def copy_stylesheets directory 'styleguide/source/stylesheets', TARGET_DIR_FOR_STYLESHEETS end |
#copy_views ⇒ Object
15 16 17 18 |
# File 'lib/generators/partystreusel/styleguide_generator.rb', line 15 def copy_views directory 'styleguide/source/styleguide', TARGET_DIR_FOR_STYLEGUIDE directory 'styleguide/source/partials', TARGET_DIR_FOR_PARTIALS end |