Skip to content

Commit

Permalink
Merge pull request #391 from zhiyelee/newversion
Browse files Browse the repository at this point in the history
prepare for next release v2.8.0
  • Loading branch information
zhiyelee committed Apr 9, 2015
2 parents c6ddd55 + 0052b7e commit 4dae21d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 1 deletion.
10 changes: 10 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@

2.8.0 / 2015-04-07
==================

* Add `process.execArg` support, execution args like `--harmony` will be passed to sub-commands #387 @DigitalIO @zhiyelee
* Fix bug in Git-style sub-commands #372 @zhiyelee
* Allow commands to be hidden from help #383 @tonylukasavage
* When git-style sub-commands are in use, yet none are called, display help #382 @claylo
* Add ability to specify arguments syntax for top-level command #258 @rrthomas
* Support multiline descriptions #208 @zxqfox

2.7.1 / 2015-03-11
==================

Expand Down
6 changes: 6 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ The commander will try to search the executables in the directory of the entry s

If the program is designed to be installed globally, make sure the executables have proper modes, like `755`.

### `--harmony`

You can enable `--harmony` option in two ways:
* Use `#! /usr/bin/env node --harmony` in the sub-commands scripts. Note some os version don’t support this pattern.
* Use the `--harmony` option when call the command, like `node --harmony examples/pm publish`. The `--harmony` option will be preserved when spawning sub-command process.

## Automated --help

The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:
Expand Down
1 change: 1 addition & 0 deletions examples/pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ program
.command('install [name]', 'install one or more packages')
.command('search [query]', 'search with optional query')
.command('list', 'list packages installed')
.command('publish', 'publish the package')
.parse(process.argv);

// here .command() is invoked with a description,
Expand Down
6 changes: 6 additions & 0 deletions examples/pm-publish.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
'use strict';
if (true) {
let info = 'publish';
console.log(info)
}

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "commander",
"version": "2.7.1",
"version": "2.8.0",
"description": "the complete solution for node.js command-line programs",
"keywords": [
"command",
Expand Down

0 comments on commit 4dae21d

Please sign in to comment.