Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
When you're ready to publish to bower, NPM, etc., do the following:
1. Figure out what the new NPM version number will be (semver major.minor.patch)
2. Update the version numbers to the (soon to be) new NPM version number in bower.json, component.json, etc. (but not in package.json)
3. Commit the repo with a message like "Updated version number in bower and component.json"
4. Run the NPM version command:
> npm version major|minor|patch|[new version number] -m "Updating NPM version"
//This step updates the version number in package.json. If you did steps 1-3 correctly, the version number in package, bower and component.json should be the same
5. Run the NPM publish command:
> npm publish
6. Push the repo to github
7. Avoid the embarrassment of having 10 commits in github just to get the versions aligned :D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.