Skip to content

Commit

Permalink
Tidy up some old examples (#1604)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowspawn authored Sep 15, 2021
1 parent 950f742 commit c1472bc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 26 deletions.
6 changes: 5 additions & 1 deletion examples/custom-help-description
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const program = new Command();
program
.helpOption('-c, --HELP', 'custom help message')
.option('-s, --sessions', 'add session support')
.option('-t, --template <engine>', 'specify template engine (jade|ejs) [jade]', 'jade');
.option('-t, --template <engine>', 'specify template engine', 'jade');

program
.command('child')
Expand All @@ -19,3 +19,7 @@ program
});

program.parse(process.argv);

// Try the following:
// node custom-help-description -c
// node custom-help-description child --HELP
6 changes: 5 additions & 1 deletion examples/custom-version
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ const program = new Command();
program
.version('0.0.1', '-v, --VERSION', 'new version message')
.option('-s, --sessions', 'add session support')
.option('-t, --template <engine>', 'specify template engine (jade|ejs) [jade]', 'jade');
.option('-t, --template <engine>', 'specify template engine', 'jade');

program.parse(process.argv);

// Try the following:
// node custom-version -v
// node custom-version --VERSION
23 changes: 0 additions & 23 deletions examples/defaults

This file was deleted.

2 changes: 1 addition & 1 deletion examples/pm-install
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (!pkgs.length) {
}

console.log();
if (program.force) console.log(' force: install');
if (program.opts().force) console.log(' force: install');
pkgs.forEach(function(pkg) {
console.log(' install : %s', pkg);
});
Expand Down

0 comments on commit c1472bc

Please sign in to comment.