Skip to content

Instantly share code, notes, and snippets.

@Rub21
Forked from coolaj86/how-to-publish-to-npm.md
Last active August 29, 2015 14:16
Show Gist options
  • Save Rub21/0cae98a8e147fd986b8a to your computer and use it in GitHub Desktop.
Save Rub21/0cae98a8e147fd986b8a to your computer and use it in GitHub Desktop.

Getting Started with NPM (as a developer)- Segir si funciona

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 "you@example.com"
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 install -g pakmanager
# this shows you dependencies as you `require`d them
pakmanager deps
# now edit `package.json` and add any deps you forgot about

npm publish ./

Beta and Release versions

If you don't want something to install by default

npm publish ./ --tag beta

If you published a bugfix as v1.0.7 and need to set v1.1.3 back to latest

git checkout v1.0.7
npm publish ./
   
git checkout v1.1.3
npm tag foobar@1.1.3 latest

More Info

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

===

2069 npm init

2070 pakmanager deps

2071 npm publish ./

@Rub21
Copy link
Author

Rub21 commented Feb 26, 2015

actulizar tu modulo

npm version patch
and then npm publish worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment