exclude .git folder when init'ing a local template

freshly init'd middleman projects from a local template should not
include the git files from that template because that's confusing.
this is to help users who clone git repos into `~/.middleman/`.
This commit is contained in:
justin blecher 2014-11-12 19:12:52 -05:00
parent 4f93adffcc
commit dcca8968c8

View file

@ -9,7 +9,7 @@ class Middleman::Templates::Local < Middleman::Templates::Base
# Just copy from the template path # Just copy from the template path
# @return [void] # @return [void]
def build_scaffold! def build_scaffold!
directory options[:template].to_s, location, force: options[:force] directory options[:template].to_s, location, force: options[:force], exclude_pattern: /\.git\/.*/
end end
end end