mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
Fix --clean option to not be an error if it is passed (for backwards compatibility)
This commit is contained in:
parent
6eb7ff72d3
commit
a2822ce7f5
2 changed files with 5 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
master
|
||||
===
|
||||
|
||||
* "middleman build" will clean out old files from the build directory by default now, without needing to pass "--clean". Pass "--no-clean" to disable. #862
|
||||
* Allow frontmatter to be side-loaded from a neighboring file with a .frontmatter extension: #855
|
||||
* Allow frontmatter "renderer_options" key to overwrite renderer options on a per-file basis. #859
|
||||
* A custom :partials_dir may be configured, and partials will be looked up from it. #854
|
||||
|
|
|
@ -15,10 +15,10 @@ module Middleman::Cli
|
|||
namespace :build
|
||||
|
||||
desc "build [options]", "Builds the static site for deployment"
|
||||
method_option :no_clean,
|
||||
method_option :clean,
|
||||
:type => :boolean,
|
||||
:default => false,
|
||||
:desc => 'Do not remove orphaned files from build'
|
||||
:default => true,
|
||||
:desc => 'Remove orphaned files from build (--no-clean to disable)'
|
||||
method_option :glob,
|
||||
:type => :string,
|
||||
:aliases => "-g",
|
||||
|
@ -59,7 +59,7 @@ module Middleman::Cli
|
|||
|
||||
opts = {}
|
||||
opts[:glob] = options["glob"] if options.has_key?("glob")
|
||||
opts[:clean] = !options["no_clean"] if options.has_key?("no_clean")
|
||||
opts[:clean] = options["clean"] if options.has_key?("clean")
|
||||
|
||||
action GlobAction.new(self, opts)
|
||||
|
||||
|
|
Loading…
Reference in a new issue