This guide explains how to publish the simple-worktree package to npm.
-
Test the package locally:
npm install npm link # Test commands simple-worktree --version simple-worktree --help -
Update package version in
package.jsonif needed -
Update CHANGELOG.md with release notes
-
Review and update:
- README.md for accuracy
- Repository URLs in package.json
- Author information
-
Login to npm (if not already logged in):
npm login
-
Publish the package:
npm publish
-
Verify publication:
npm info simple-worktree
-
Create a git tag for the release:
git tag -a simple-worktree-v1.0.0 -m "Release simple-worktree v1.0.0" git push origin simple-worktree-v1.0.0 -
Test installation from npm:
npm install -g simple-worktree simple-worktree --version
- Make changes to the code
- Update version in
package.json(follow semver) - Update CHANGELOG.md
- Publish with
npm publish
If you don't want to publish to npm, you can use it locally:
# From the simple-worktree directory
npm install
npm link
# Now you can use it anywhere on your system
simple-worktree create my-feature