Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Commit

Permalink
Add optional / binName
Browse files Browse the repository at this point in the history
  • Loading branch information
jblandry committed Mar 28, 2017
1 parent 1992662 commit 59116b2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ module.exports = class Cli {
return chalk.green;
}

static optional(name) {
return `${chalk.reset('[')}${chalk.yellow(name)}${chalk.reset(']')}`;
}

static optionalPlaceholder(name) {
return `${chalk.reset('[')}${this.placeholder(name)}${chalk.reset(']')}`;
}
Expand All @@ -74,6 +78,12 @@ module.exports = class Cli {
}


//-- Get binary name
static get binName() {
return pkg.name;
}


//-- Set full usage
static setFullUsage(fullUsage) {
STATIC.fullUsage = fullUsage;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@absolunet/cli",
"version": "0.0.3",
"version": "0.0.4",
"description": "CLI utilities",
"definition": "",
"homepage": "https://github.com/absolunet/node-cli",
Expand Down

0 comments on commit 59116b2

Please sign in to comment.