2011-12-10 20:17:47 +01:00
|
|
|
# HTML5 Boilerplate template
|
2011-04-13 05:32:13 +02:00
|
|
|
class Middleman::Templates::Html5 < Middleman::Templates::Base
|
2014-03-13 11:57:19 +01:00
|
|
|
# Slightly different paths
|
|
|
|
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'
|
2012-08-14 00:39:06 +02:00
|
|
|
|
2014-03-13 11:57:19 +01:00
|
|
|
# Template files are relative to this file
|
2011-12-18 05:12:13 +01:00
|
|
|
# @return [String]
|
2011-04-13 05:32:13 +02:00
|
|
|
def self.source_root
|
2011-07-26 05:48:49 +02:00
|
|
|
File.dirname(__FILE__)
|
2011-04-13 05:32:13 +02:00
|
|
|
end
|
2012-08-14 00:39:06 +02:00
|
|
|
|
2011-12-10 20:17:47 +01:00
|
|
|
# Output the files
|
2011-12-18 05:12:13 +01:00
|
|
|
# @return [void]
|
|
|
|
def build_scaffold!
|
2013-12-28 01:26:31 +01:00
|
|
|
template 'shared/config.tt', File.join(location, 'config.rb')
|
|
|
|
directory 'html5/source', File.join(location, 'source')
|
2011-04-13 05:32:13 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-03-13 11:57:19 +01:00
|
|
|
# Register this template
|
2012-08-14 00:39:06 +02:00
|
|
|
Middleman::Templates.register(:html5, Middleman::Templates::Html5)
|