Skip to content

Instantly share code, notes, and snippets.

@ogt
Last active December 19, 2015 09:49
Show Gist options
  • Save ogt/5935744 to your computer and use it in GitHub Desktop.
Save ogt/5935744 to your computer and use it in GitHub Desktop.
HOWTO - Publish an npm module
# assumes that you are on a repo that is committed, pushed to github that you want to publish
a new version of an existing module that is already pointing to this github repo
# if machine not already authorized of
> npm adduser
# the following command will change the version specified in the
# package.json file, git add, git commit, and add a git tag 1.2.3 for you
npm version 1.2.3
# to push the package.json change
git push origin master
# to push the tags
git push --tags
# or in one command both
git push --tags origin master
# to publish
npm publish .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment