class Bootstrap::Generators::InstallGenerator
def add_assets
def add_assets if File.exist?('app/assets/javascripts/application.js') insert_into_file "app/assets/javascripts/application.js", "//= require twitter/bootstrap\n", :after => "jquery_ujs\n" else copy_file "application.js", "app/assets/javascripts/application.js" end if File.exist?('app/assets/stylesheets/application.css') # Add our own require: content = File.read("app/assets/stylesheets/application.css") if content.match(/require_tree\s+\.\s*$/) # Good enough - that'll include our bootstrap_and_overrides.css.less else style_require_block = " *= require bootstrap_and_overrides\n" insert_into_file "app/assets/stylesheets/application.css", style_require_block, :after => "require_self\n" end else copy_file "application.css", "app/assets/stylesheets/application.css" end end