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
|
2012-08-14 00:39:06 +02:00
|
|
|
|
2013-12-28 01:26:31 +01:00
|
|
|
class_option 'css_dir',
|
|
|
|
:default => 'css',
|
2012-03-04 01:40:03 +01:00
|
|
|
:desc => 'The path to the css files'
|
2013-12-28 01:26:31 +01:00
|
|
|
class_option 'js_dir',
|
|
|
|
:default => 'js',
|
2012-03-04 01:40:03 +01:00
|
|
|
:desc => 'The path to the javascript files'
|
2013-12-28 01:26:31 +01:00
|
|
|
class_option 'images_dir',
|
|
|
|
:default => 'img',
|
2012-03-04 01:40:03 +01:00
|
|
|
:desc => 'The path to the image files'
|
2012-08-14 00:39:06 +02:00
|
|
|
|
2011-12-10 20:17:47 +01:00
|
|
|
# Templates 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')
|
|
|
|
empty_directory File.join(location, 'source')
|
2011-04-13 05:32:13 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-12-10 20:17:47 +01:00
|
|
|
# Register the template
|
2012-08-14 00:39:06 +02:00
|
|
|
Middleman::Templates.register(:html5, Middleman::Templates::Html5)
|