Skip to content

Commit

Permalink
Fixed boolean CLI argument notation (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkphl committed Apr 22, 2015
1 parent 1d0c738 commit c522786
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 1.1.2 Bugfix release (unreleased)
* Fixed symbol example template regression bug ([#70](https://github.com/jkphl/svg-sprite/issues/70#issuecomment-95307588))
* Added mixin option to CLI arguments
* Fixed boolean CLI argument notation ([#76](https://github.com/jkphl/svg-sprite/issues/76))

## 1.1.1 Bugfix release (2015-04-19)
* Updated dependencies & development dependencies
Expand Down
5 changes: 5 additions & 0 deletions bin/svg-sprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ function addOption(name, option) {
var template = (name.substr(-9) == '-template'),
def = template ? path.resolve(path.dirname(__dirname), option.default) : option.default;
yargs = yargs.default(alias, def);

if ((option.default === true) || (option.default === false)) {
yargs = yargs.boolean(name);
}

} else if (option.required) {
yargs = yargs.require(alias);
}
Expand Down

0 comments on commit c522786

Please sign in to comment.