Skip to content

Instantly share code, notes, and snippets.

@kurtmilam
Created April 12, 2016 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kurtmilam/c88f1dcec06625e2fd369ecf4180ddcb to your computer and use it in GitHub Desktop.
Save kurtmilam/c88f1dcec06625e2fd369ecf4180ddcb to your computer and use it in GitHub Desktop.
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