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
|
2012-08-14 00:39:06 +02:00
|
|
|
|
2011-12-10 20:17:47 +01:00
|
|
|
# Slightly different paths
|
2013-12-28 01:26:31 +01:00
|
|
|
class_option :css_dir, :default => 'css'
|
|
|
|
class_option :js_dir, :default => 'js'
|
|
|
|
class_option :images_dir, :default => 'img'
|
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')
|
|
|
|
empty_directory File.join(location, 'source')
|
2011-09-20 18:17:46 +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(:mobile, Middleman::Templates::Mobile)
|