Sha256: 79242764da81701cdfd2e5a273ed729518015d2007053e4f9a5527517fd8c436

Contents?: true

Size: 1.56 KB

Versions: 4

Compression:

Stored size: 1.56 KB

Contents

# Default Middleman template
class Middleman::Templates::Default < Middleman::Templates::Base
  
  # Template files are relative to this file
  # @return [String]
  def self.source_root
    File.dirname(__FILE__)
  end
  
  # Actually output the files
  # @return [void]
  def build_scaffold!
    template "shared/config.tt", File.join(location, "config.rb")
    copy_file "default/source/index.html.erb", File.join(location, "source/index.html.erb")
    copy_file "default/source/layouts/layout.erb", File.join(location, "source/layouts/layout.erb")
    empty_directory File.join(location, "source", options[:css_dir])
    copy_file "default/source/stylesheets/all.css.scss", File.join(location, "source", options[:css_dir], "all.css.scss")
    copy_file "default/source/stylesheets/_animate.scss", File.join(location, "source", options[:css_dir], "_animate.scss")
    copy_file "default/source/stylesheets/_normalize.scss", File.join(location, "source", options[:css_dir], "_normalize.scss")
    empty_directory File.join(location, "source", options[:js_dir])
    copy_file "default/source/javascripts/all.js", File.join(location, "source", options[:js_dir], "all.js")
    empty_directory File.join(location, "source", options[:images_dir])
    copy_file "default/source/images/background.png", File.join(location, "source", options[:images_dir], "background.png")
    copy_file "default/source/images/middleman.png", File.join(location, "source", options[:images_dir], "middleman.png")
  end  
end

# Register this template
Middleman::Templates.register(:default, Middleman::Templates::Default)

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
middleman-core-3.0.0.alpha.9 lib/middleman-core/templates/default.rb
middleman-core-3.0.0.alpha.8 lib/middleman-core/templates/default.rb
middleman-core-3.0.0.alpha.7 lib/middleman-core/templates/default.rb
middleman-3.0.0.alpha.6 lib/middleman/templates/default.rb