middleman/middleman-templates/lib/middleman-templates/mobile.rb

26 lines
718 B
Ruby
Raw Normal View History

# Mobile HTML5 Boilerplate
class Middleman::Templates::Mobile < Middleman::Templates::Base
# Slightly different paths
class_option :css_dir, :default => 'css'
class_option :js_dir, :default => 'js'
class_option :images_dir, :default => 'img'
# Template files are relative to this file
2011-12-18 05:12:13 +01:00
# @return [String]
def self.source_root
File.dirname(__FILE__)
end
# Output the files
2011-12-18 05:12:13 +01:00
# @return [void]
def build_scaffold!
template 'shared/config.tt', File.join(location, 'config.rb')
directory 'mobile/source', File.join(location, 'source')
empty_directory File.join(location, 'source')
end
end
# Register the template
Middleman::Templates.register(:mobile, Middleman::Templates::Mobile)