Skip to content

Instantly share code, notes, and snippets.

@hacksparrow
Forked from coolaj86/how-to-publish-to-npm.md
Created November 25, 2013 14:09
Show Gist options
  • Save hacksparrow/7641739 to your computer and use it in GitHub Desktop.
Save hacksparrow/7641739 to your computer and use it in GitHub Desktop.
If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
Then create a `package.json` and publish it:
cd /path/to/your-project
npm init
npm publish ./
More Info:
* http://npmjs.org/doc/json.html
* http://npmjs.org/doc/developers.html
Appendix:
If you haven't already installed npm, or you'd like the latest version:
# OS X
curl http://npmjs.org/install.sh | sh
# Linux
curl http://npmjs.org/install.sh | sudo sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment