10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/generators/bootstrapped/install/install_generator.rb', line 10
def add_assets
if File.exist?('app/assets/javascripts/application.js')
insert_into_file "app/assets/javascripts/application.js", "//= require bootstrap\n", :after => "jquery_ujs\n"
else
copy_file "application.js", "app/assets/javascripts/application.js"
end
unless css_engine.eql?('static')
if File.exist?('app/assets/stylesheets/application.css')
style_require_block = " *= require bootstrap_and_overrides\n"
insert_into_file "app/assets/stylesheets/application.css", style_require_block, :after => "require_self\n"
else
copy_file "application.css", "app/assets/stylesheets/application.css"
end
else
style_require_block = " *= require twitter/bootstrap/static/bootstrap\n"
insert_into_file "app/assets/stylesheets/application.css", style_require_block, :after => "require_self\n"
end
end
|