Method: Middleman::Slim::Template#build_scaffold!

Defined in:
lib/middleman-slim/template.rb

#build_scaffold!Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/middleman-slim/template.rb', line 21

def build_scaffold!
  template 'shared/Gemfile.tt', File.join(location, 'Gemfile')
  template 'shared/config.tt', File.join(location, 'config.rb')
  copy_file 'source/index.html.slim', File.join(location, 'source/index.html.slim')
  copy_file 'source/layouts/layout.slim', File.join(location, 'source/layouts/layout.slim')

  empty_directory File.join(location, 'source', options[:css_dir])
  copy_file 'source/stylesheets/all.css', File.join(location, 'source', options[:css_dir], 'all.css')
  copy_file 'source/stylesheets/normalize.css', File.join(location, 'source', options[:css_dir], 'normalize.css')
  replace_images_dir

  empty_directory File.join(location, 'source', options[:js_dir])
  copy_file 'source/javascripts/all.js', File.join(location, 'source', options[:js_dir], 'all.js')

  empty_directory File.join(location, 'source', options[:images_dir])
  copy_file 'source/images/background.png', File.join(location, 'source', options[:images_dir], 'background.png')
  copy_file 'source/images/middleman.png', File.join(location, 'source', options[:images_dir], 'middleman.png')
end