Class: Siracha::Generators::BootstrapGenerator
- Inherits:
-
Rails::Generators::AppBase
- Object
- Rails::Generators::AppBase
- Siracha::Generators::BootstrapGenerator
- Defined in:
- lib/generators/css_framework.rb
Instance Method Summary collapse
Instance Method Details
#add_gems ⇒ Object
7 8 9 |
# File 'lib/generators/css_framework.rb', line 7 def add_gems gem 'bootstrap-sass', '~> 3.3.7' end |
#css_template ⇒ Object
15 16 17 18 |
# File 'lib/generators/css_framework.rb', line 15 def css_template remove_file('app/assets/stylesheets/application.css') directory 'stylesheets', 'app/assets/stylesheets' end |
#js_configuration ⇒ Object
20 21 22 |
# File 'lib/generators/css_framework.rb', line 20 def js_configuration gsub_file('app/assets/javascripts/application.js', Regexp.escape(%q(//= require_tree .)), "\n//= require bootstrap-sprockets\n") end |
#run_bundle_install ⇒ Object
11 12 13 |
# File 'lib/generators/css_framework.rb', line 11 def run_bundle_install bundle_command('install') end |