middleman/middleman-core/lib/middleman-core/templates/html5.rb

31 lines
841 B
Ruby
Raw Normal View History

# HTML5 Boilerplate template
class Middleman::Templates::Html5 < Middleman::Templates::Base
class_option "css_dir",
:default => "css",
:desc => 'The path to the css files'
class_option "js_dir",
:default => "js",
:desc => 'The path to the javascript files'
class_option "images_dir",
:default => "img",
:desc => 'The path to the image files'
# Templates are relative to this file
2011-12-18 05:12:13 +01:00
# @return [String]
def self.source_root
2011-07-26 05:48:49 +02:00
File.dirname(__FILE__)
end
# Output the files
2011-12-18 05:12:13 +01:00
# @return [void]
def build_scaffold!
2011-07-26 05:48:49 +02:00
template "shared/config.tt", File.join(location, "config.rb")
directory "html5/source", File.join(location, "source")
empty_directory File.join(location, "source")
end
end
# Register the template
Middleman::Templates.register(:html5, Middleman::Templates::Html5)