2011-12-10 20:17:47 +01:00
|
|
|
# Local templates
|
2011-04-17 01:23:10 +02:00
|
|
|
class Middleman::Templates::Local < Middleman::Templates::Base
|
2014-03-24 11:29:21 +01:00
|
|
|
# Look for templates inside .middleman in the user's home directory
|
2011-12-18 05:12:13 +01:00
|
|
|
# @return [String]
|
2011-04-17 01:23:10 +02:00
|
|
|
def self.source_root
|
2014-03-24 11:29:21 +01:00
|
|
|
File.join(Dir.home, '.middleman')
|
2011-04-17 01:23:10 +02:00
|
|
|
end
|
|
|
|
|
2011-12-10 20:17:47 +01:00
|
|
|
# Just copy from the template path
|
2011-12-18 05:12:13 +01:00
|
|
|
# @return [void]
|
|
|
|
def build_scaffold!
|
2011-04-17 01:23:10 +02:00
|
|
|
directory options[:template].to_s, location
|
2012-08-14 00:39:06 +02:00
|
|
|
end
|
2011-04-17 01:23:10 +02:00
|
|
|
end
|
|
|
|
|
2014-03-13 11:57:19 +01:00
|
|
|
# Register this template
|
|
|
|
Middleman::Templates.register(:local, Middleman::Templates::Local)
|