fix(nx): npm scripts documentation generation #1568
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before, a single instance of
yargs
was accumulating options, so commands parsed later would have options from prior commands. That's because allyargs
options are global by default. Now, a new instance ofyargs
is required before each command is parsed, so global options aren't accumulated.I initially added
global: false
to all options innx-commands.ts
, but that didn't work because someyargs
methods such as implies set globals. Since options being global doesn't seem to be an issue except with the docs gen, I chose to make the change there.👉
lint-files
,update
,update:check
, andupdate:skip
now only documenthelp
andversion
because the docs are based onyargs
options and those commands don't have specificyargs
options. How would you like to handle these? We can leave them as is, filter them out, or add code to the docs gen to handle them? Removing them makes sense to me sincelint-files
andupdate:skip
aren't npm scripts, andupdate
andupdate:check
are handled by Angular CLI.fixes #1567 #1535