Class: Bootstrap::CustomizeGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Bootstrap::CustomizeGenerator
- Defined in:
- lib/generators/bootstrap/customize_generator.rb
Instance Method Summary collapse
- #customize_css_components ⇒ Object
-
#customize_default_variables ⇒ Object
Copy all needed stylesheets in the asset directory of the application.
- #customize_js_components ⇒ Object
- #show_usage ⇒ Object
Instance Method Details
#customize_css_components ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/generators/bootstrap/customize_generator.rb', line 16 def customize_css_components if .css_components? append_file "app/assets/stylesheets/bootstrap-custom.css.scss" do File.read File.("../../../../app/assets/stylesheets/twitter/bootstrap.css.scss", __FILE__) end end end |
#customize_default_variables ⇒ Object
Copy all needed stylesheets in the asset directory of the application
12 13 14 |
# File 'lib/generators/bootstrap/customize_generator.rb', line 12 def customize_default_variables template "bootstrap-custom.css.scss", "app/assets/stylesheets/bootstrap-custom.css.scss" end |
#customize_js_components ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/generators/bootstrap/customize_generator.rb', line 24 def customize_js_components if .js_components? template "bootstrap-custom.js", "app/assets/javascripts/bootstrap-custom.js" append_file "app/assets/javascripts/bootstrap-custom.js" do File.read File.("../../../../app/assets/javascripts/twitter/bootstrap.js", __FILE__) end end end |
#show_usage ⇒ Object
33 34 35 |
# File 'lib/generators/bootstrap/customize_generator.rb', line 33 def show_usage readme "USAGE" if behavior == :invoke end |