From 46d9f07e1815eeadf6b37e089b20440109ce4a7e Mon Sep 17 00:00:00 2001 From: Gar Date: Thu, 8 Apr 2021 13:49:48 -0700 Subject: [PATCH] fixup: add documentation --- docs/content/commands/npm-version.md | 83 +++++++++++++++++----------- 1 file changed, 50 insertions(+), 33 deletions(-) diff --git a/docs/content/commands/npm-version.md b/docs/content/commands/npm-version.md index 0eb814b9899b..cdf0f977f503 100644 --- a/docs/content/commands/npm-version.md +++ b/docs/content/commands/npm-version.md @@ -14,6 +14,56 @@ npm version [ | major | minor | patch | premajor | preminor | prepat 'npm ls' to inspect current package/dependency versions ``` +### Configuration + +#### `allow-same-version` + +* Default: `false` +* Type: Boolean + +Prevents throwing an error when `npm version` is used to set the new version +to the same value as the current version. + +#### `git-tag-version` + +* Default: `true` +* Type: Boolean + +Commit and tag the version change. + +#### `commit-hooks` + +* Default: `true` +* Type: Boolean + +Run git commit hooks when committing the version change. + +#### `sign-git-tag` + +* Default: `false` +* Type: Boolean + +Pass the `-s` flag to git to sign the tag. + +Note that you must have a default GPG key set up in your git config for this to work properly. + +#### workspaces + +* Default: `false` +* Type: Boolean + +Enables workspaces context and includes workspaces in reported output +when getting versions. When setting a new version *only the workspaces +will be changed*. + +#### workspace + +* Default: [] +* Type: Array + +Enables workspaces context and limits results to only those specified by +this config item. + ### Description Run this in a package directory to bump the version and write the new @@ -87,39 +137,6 @@ This runs all your tests and proceeds only if they pass. Then runs your `build` adds everything in the `dist` directory to the commit. After the commit, it pushes the new commit and tag up to the server, and deletes the `build/temp` directory. -### Configuration - -#### `allow-same-version` - -* Default: `false` -* Type: Boolean - -Prevents throwing an error when `npm version` is used to set the new version -to the same value as the current version. - -#### `git-tag-version` - -* Default: `true` -* Type: Boolean - -Commit and tag the version change. - -#### `commit-hooks` - -* Default: `true` -* Type: Boolean - -Run git commit hooks when committing the version change. - -#### `sign-git-tag` - -* Default: `false` -* Type: Boolean - -Pass the `-s` flag to git to sign the tag. - -Note that you must have a default GPG key set up in your git config for this to work properly. - ### See Also * [npm init](/commands/npm-init)