Skip to content

Commit

Permalink
feat(cli): print options for lb4 copyright --help and update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondfeng committed Apr 7, 2020
1 parent 741ba10 commit f23ecb7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/site/Copyright-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ Please note the command expects `git` is installed.
`--gitOnly` : _(Optional)_ A flag to control if only git tracked files are
updated. Default to `true`.

`--updateLicense`: _(Optional)_ A flag to control if `package.json` and
`LICENSE` files should be updated to reflect the selected license id.

`--exclude`: _(Optional)_ One or more glob patterns with `,` delimiter to
exclude files that match the patterns from being updated.

### Interactive Prompts

The command prompts you for:
Expand Down
5 changes: 4 additions & 1 deletion packages/cli/generators/copyright/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = class CopyrightGenerator extends BaseGenerator {
this.env.adapter.promptModule.registerPrompt('autocomplete', autocomplete);
}

setOptions() {
_setupGenerator() {
this.option('owner', {
type: String,
required: false,
Expand Down Expand Up @@ -68,6 +68,9 @@ module.exports = class CopyrightGenerator extends BaseGenerator {
default: '',
description: g.f('Exclude files that match the pattern'),
});
}

setOptions() {
return super.setOptions();
}

Expand Down

0 comments on commit f23ecb7

Please sign in to comment.