Skip to content

Commit

Permalink
fixup: add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Apr 8, 2021
1 parent 4b25921 commit 46d9f07
Showing 1 changed file with 50 additions and 33 deletions.
83 changes: 50 additions & 33 deletions docs/content/commands/npm-version.md
Expand Up @@ -14,6 +14,56 @@ npm version [<newversion> | 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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 46d9f07

Please sign in to comment.