12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/generators/bootstrap/component_helper/install/install_generator.rb', line 12
def add_assets
copy_file "index.css.scss", "app/assets/stylesheets/bootstrap_component_helper/index.css.scss"
copy_file "index.js", "app/assets/javascripts/bootstrap_component_helper/index.js"
js_manifest = 'app/assets/javascripts/application.js'
if File.exist?(js_manifest)
insert_into_file js_manifest, :before => "//= require_tree .\n" do
"//= require bootstrap_component_helper\n JS\n end\n end\n\n css_manifest = 'app/assets/stylesheets/application.css'\n\n if File.exist?(css_manifest)\n insert_into_file css_manifest, :before => \" *= require_self\\n\" do\n <<-CSS\n *= require bootstrap_component_helper\n CSS\n end\n end\nend\n"
|