10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/generators/kickoff/layout/layout_generator.rb', line 10
def create_layout
if options.haml?
template 'layout.html.haml', "app/views/layouts/#{file_name}.html.haml"
copy_file 'stylesheet.sass', "public/stylesheets/sass/#{file_name}.sass"
else
template 'layout.html.erb', "app/views/layouts/#{file_name}.html.erb"
copy_file 'application.scss', "app/assets/stylesheets/application.scss"
copy_file '_reset.scss', "app/assets/stylesheets/_reset.scss"
copy_file '_variables.scss', "app/assets/stylesheets/_variables.scss"
copy_file '_mixins.scss', "app/assets/stylesheets/_mixins.scss"
copy_file '_scaffolding.scss', "app/assets/stylesheets/_scaffolding.scss"
copy_file '_type.scss', "app/assets/stylesheets/_type.scss"
copy_file '_forms.scss', "app/assets/stylesheets/_forms.scss"
copy_file '_tables.scss', "app/assets/stylesheets/_tables.scss"
copy_file '_patterns.scss', "app/assets/stylesheets/_patterns.scss"
remove_file 'app/assets/stylesheets/application.css'
end
copy_file 'layout_helper.rb', 'app/helpers/layout_helper.rb'
copy_file 'error_messages_helper.rb', 'app/helpers/error_messages_helper.rb'
end
|