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