Last active
December 19, 2015 09:49
-
-
Save ogt/5935744 to your computer and use it in GitHub Desktop.
HOWTO - Publish an npm module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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