Include middleman-core's template path in the list of source_paths so that inherited templates in other gems can still use the Gemfile and config.ru from the main middleman gem.

This commit is contained in:
Ben Hollis 2012-03-18 18:58:15 -06:00
parent bacffeea02
commit 0d80678e48

View file

@ -29,21 +29,17 @@ module Middleman::Templates
class Base < ::Thor::Group class Base < ::Thor::Group
include Thor::Actions include Thor::Actions
def initialize(names, options)
super
source_paths << File.join(File.dirname(__FILE__), 'templates')
end
# Required path for the new project to be generated # Required path for the new project to be generated
argument :location, :type => :string argument :location, :type => :string
# Name of the template being used to generate the project. # Name of the template being used to generate the project.
class_option :template, :default => "default" class_option :template, :default => "default"
# What to call the directory which CSS will be searched for.
class_option :css_dir#, :default => "stylesheets"
# What to call the directory which JS will be searched for.
class_option :js_dir#, :default => "javascripts"
# What to call the directory which images will be searched for.
class_option :images_dir#, :default => "images"
# Output a config.ru file for Rack if --rack is passed # Output a config.ru file for Rack if --rack is passed
class_option :rack, :type => :boolean, :default => false class_option :rack, :type => :boolean, :default => false