diff --git a/lib/middleman/cli.rb b/lib/middleman/cli.rb index c2840276..91847165 100644 --- a/lib/middleman/cli.rb +++ b/lib/middleman/cli.rb @@ -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) diff --git a/lib/middleman/templates/default.rb b/lib/middleman/templates/default.rb index 65ab6999..0c5e1d8e 100644 --- a/lib/middleman/templates/default.rb +++ b/lib/middleman/templates/default.rb @@ -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])