@anycli/command
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -0,1 +1,9 @@ | ||
<a name="1.1.0"></a> | ||
# [1.1.0](https://github.com/anycli/command/compare/209d4fff5eeca27768ef5fba96512408d2817cc4...v1.1.0) (2018-02-03) | ||
### Features | ||
* added main command for multi CLI projects ([a215636](https://github.com/anycli/command/commit/a215636)) | ||
<a name="1.0.1"></a> | ||
@@ -2,0 +10,0 @@ ## [1.0.1](https://github.com/anycli/command/compare/1599c40ed9f935cff4ae4c3b3cce8ff9f7b3969e...v1.0.1) (2018-02-03) |
@@ -15,2 +15,3 @@ import * as Config from '@anycli/config'; | ||
static strict: boolean; | ||
static parse: boolean; | ||
static flags: flags.Input<any>; | ||
@@ -20,2 +21,3 @@ static args: Parser.args.IArg[]; | ||
static examples: string[] | undefined; | ||
static parserOptions: {}; | ||
/** | ||
@@ -22,0 +24,0 @@ * instantiate and run the command |
@@ -30,8 +30,5 @@ "use strict"; | ||
async init() { | ||
const o = Parser.parse(this.argv, { | ||
flags: this.ctor.flags, | ||
args: this.ctor.args, | ||
strict: this.ctor.strict || !this.ctor.variableArgs, | ||
context: this, | ||
}); | ||
if (!this.ctor.parse) | ||
return; | ||
const o = Parser.parse(this.argv, Object.assign({ flags: this.ctor.flags, args: this.ctor.args, strict: this.ctor.strict || !this.ctor.variableArgs, context: this }, (this.ctor.parserOptions || {}))); | ||
this.flags = o.flags; | ||
@@ -56,2 +53,3 @@ this.args = o.args; | ||
Command.strict = true; | ||
Command.parse = true; | ||
Command.flags = { | ||
@@ -62,2 +60,3 @@ version: flags.version(), | ||
Command.args = []; | ||
Command.parserOptions = {}; | ||
/** | ||
@@ -64,0 +63,0 @@ * instantiate and run the command |
{ | ||
"name": "@anycli/command", | ||
"description": "anycli base command", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"author": "Jeff Dickey @jdxcode", | ||
"bugs": "https://github.com/anycli/command/issues", | ||
"dependencies": { | ||
"@anycli/parser": "^3.1.1", | ||
"@anycli/parser": "^3.2.0", | ||
"cli-ux": "^3.3.13", | ||
@@ -10,0 +10,0 @@ "debug": "^3.1.0", |
28634
11
269
Updated@anycli/parser@^3.2.0