2011-12-10 20:17:47 +01:00
|
|
|
# Mobile HTML5 Boilerplate
|
2011-09-20 18:17:46 +02:00
|
|
|
class Middleman::Templates::Mobile < Middleman::Templates::Base
|
2011-12-10 20:17:47 +01:00
|
|
|
# Slightly different paths
|
2014-03-13 11:57:19 +01:00
|
|
|
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'
|
2011-09-20 18:17:46 +02:00
|
|
|
|
2011-12-10 20:17:47 +01:00
|
|
|
# Template files are relative to this file
|
2011-12-18 05:12:13 +01:00
|
|
|
# @return [String]
|
2011-09-20 18:17:46 +02:00
|
|
|
def self.source_root
|
|
|
|
File.dirname(__FILE__)
|
|
|
|
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 'mobile/source', File.join(location, 'source')
|
2011-09-20 18:17:46 +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(:mobile, Middleman::Templates::Mobile)
|