Skip to content

Commit

Permalink
Update commander program to use package.json for settings
Browse files Browse the repository at this point in the history
  • Loading branch information
DanDroryAu committed Nov 27, 2024
1 parent 3d4c09a commit ab5272a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .changeset/olive-cups-kiss.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

Change the CLI to commander.js.

### Breaking Changes
**BREAKING CHANGE**

SKU now uses [commander.js](https://github.com/tj/commander.js) for its CLI. The CLI options and commands are now more narrowly defined. Some combinations of options that were previously unintended may no longer work.
SKU now uses [commander.js](https://github.com/tj/commander.js) for its CLI. The CLI options and commands are now more narrowly defined and scoped. Some combinations of options that were previously unintended may no longer work.

The new `-h, --help` flag now shows the help output generated by commander.js and shows the available commands and options.
7 changes: 4 additions & 3 deletions packages/sku/lib/program/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ const packageManagerOption = require('./options/packageManager/packageManager.op
const debugOption = require('./options/debug/debug.option');
const configOption = require('./options/config/config.option');
const environmentOption = require('./options/environment/environment.option');
const { name, description, version } = require('../../package.json');

const program = new Command();

program
.name('sku')
.description('sku description')
.version('sku version')
.name(name)
.description(description)
.version(version)
.allowUnknownOption(true)
.addOption(environmentOption)
.addOption(configOption)
Expand Down

0 comments on commit ab5272a

Please sign in to comment.