Class: Html5bp::LayoutGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/html5bp/layout_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate_layoutObject



6
7
8
9
10
11
# File 'lib/generators/html5bp/layout_generator.rb', line 6

def generate_layout
  template "index.html.erb", "app/views/layouts/application.html.erb"
  insert_into_file 'app/assets/stylesheets/application.css', "*= require 'main'\n *= require 'normalize'\n ", before: "*= require_tree ."
  insert_into_file 'app/assets/javascripts/application.js', "\n//= require plugins", after: "//= require turbolinks"
  create_file 'config/initializers/assets.rb', "Rails.application.config.assets.precompile += %w( modernizr-2.6.2.min.js )"
end