Class: TwbsSassRails::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_bootstrapObject



18
19
20
21
22
# File 'lib/generators/twbs_sass_rails/install/install_generator.rb', line 18

def copy_bootstrap
  copy_file 'twbs.js.coffee',      'app/assets/javascripts/twbs.js.coffee'
  copy_file 'twbs-variables.scss', 'app/assets/stylesheets/twbs-variables.scss'
  copy_file 'twbs.scss',           'app/assets/stylesheets/twbs.scss'
end

#copy_css_assetsObject



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

def copy_css_assets
  copy_or_insert_into_asset 'app/assets/stylesheets/application.css', " *= stub twbs-variables\n *= require twbs\n", before: " *= require_tree .\n"
end

#copy_js_assetsObject



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

def copy_js_assets
  copy_or_insert_into_asset 'app/assets/javascripts/application.js', "//= require twbs/bootstrap\n", after: "jquery_ujs\n"
end