1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00

add --rack flag

This commit is contained in:
Thomas Reynolds 2011-08-05 10:44:41 -07:00
parent ee06e01b54
commit f5550d6fbb
2 changed files with 4 additions and 1 deletions

View file

@ -18,6 +18,7 @@ module Middleman
method_option "css_dir", :default => "stylesheets", :desc => 'The path to the css files'
method_option "js_dir", :default => "javascripts", :desc => 'The path to the javascript files'
method_option "images_dir", :default => "images", :desc => 'The path to the image files'
method_option "rack", :type => :boolean, :default => false, :desc => 'Include a config.ru file'
def init(name)
key = options[:template].to_sym
unless Middleman::Templates.registered_templates.has_key?(key)

View file

@ -5,7 +5,9 @@ class Middleman::Templates::Default < Middleman::Templates::Base
def build_scaffold
template "shared/config.tt", File.join(location, "config.rb")
template "shared/config.ru", File.join(location, "config.ru")
if options[:rack]
template "shared/config.ru", File.join(location, "config.ru")
end
copy_file "default/source/index.html.erb", File.join(location, "source/index.html.erb")
copy_file "default/source/layout.erb", File.join(location, "source/layout.erb")
empty_directory File.join(location, "source", options[:css_dir])