Class: Bootstrap::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/bootstrap/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_assetsObject



9
10
11
12
# File 'lib/generators/bootstrap/install/install_generator.rb', line 9

def add_assets
  insert_into_file "app/assets/javascripts/application.js", "//= require twitter/bootstrap\n", :after => "jquery_ujs\n"
  insert_into_file "app/assets/stylesheets/application.css", " *= require twitter/bootstrap\n", :after => "require_self\n"
end

#add_bootstrapObject



14
15
16
17
# File 'lib/generators/bootstrap/install/install_generator.rb', line 14

def add_bootstrap
  copy_file "bootstrap.coffee", "app/assets/javascripts/bootstrap.js.coffee"
  copy_file "bootstrap.less", "app/assets/stylesheets/bootstrap.css.less"
end