middleman/middleman-cli/lib/middleman-templates/local.rb

18 lines
470 B
Ruby
Raw Normal View History

# Local templates
class Middleman::Templates::Local < Middleman::Templates::Base
# Look for templates inside .middleman in the user's home directory
2011-12-18 05:12:13 +01:00
# @return [String]
def self.source_root
File.join(Dir.home, '.middleman')
end
# Just copy from the template path
2011-12-18 05:12:13 +01:00
# @return [void]
def build_scaffold!
directory options[:template].to_s, location
end
end
# Register this template
Middleman::Templates.register(:local, Middleman::Templates::Local)