Class: Alchemy::Generators::DemoKitGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Alchemy::Generators::DemoKitGenerator
- Defined in:
- lib/rails/generators/alchemy/demo_kit_generator.rb
Instance Method Summary collapse
Instance Method Details
#alchemy_scafffold ⇒ Object
9 10 11 |
# File 'lib/rails/generators/alchemy/demo_kit_generator.rb', line 9 def alchemy_scafffold invoke "alchemy:scaffold" end |
#copy_files ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/rails/generators/alchemy/demo_kit_generator.rb', line 13 def copy_files copy_file "#{config_path}/elements.yml", "#{Rails.root}/config/alchemy/elements.yml" copy_file "#{config_path}/page_layouts.yml", "#{Rails.root}/config/alchemy/page_layouts.yml" copy_file "layouts/application.html.erb", "#{Rails.root}/app/views/layouts/application.html.erb" directory "alchemy/elements", "#{Rails.root}/app/views/alchemy/elements/" directory "alchemy/page_layouts", "#{Rails.root}/app/views/alchemy/page_layouts/" end |
#inject_css_into_env ⇒ Object
21 22 23 24 |
# File 'lib/rails/generators/alchemy/demo_kit_generator.rb', line 21 def inject_css_into_env sentinel = /::Application\.configure do\s*$/ inject_into_file "#{Rails.root}/config/environments/production.rb", "\n config.assets.precompile += %w( alchemy/demo_kit.css )\n", { :after => sentinel, :verbose => true } end |