Linux command
npm-version 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Bump patch version
npm version patch
Bump minor version
npm version minor
Bump major version
npm version major
Set specific version
npm version [1.2.3]
Prerelease version
npm version prerelease
No git tag
npm version patch --no-git-tag-version
说明
npm version bumps package version. Updates package.json and creates git tag. The command manages version numbers. Follows semver conventions.
参数
- patch
- Increment patch (0.0.x).
- minor
- Increment minor (0.x.0).
- major
- Increment major (x.0.0).
- --no-git-tag-version
- Don't create git tag.
- --help
- Display help information.
FAQ
What is the npm-version command used for?
npm version bumps package version. Updates package.json and creates git tag. The command manages version numbers. Follows semver conventions.
How do I run a basic npm-version example?
Run `npm version patch` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does patch do in npm-version?
Increment patch (0.0.x).