How to publish packages to NPM


1 minute read - suggest an edit

If you haven’t already set your NPM author info, here’s how you do it

# npm set init.author.name "Your Name"
# npm set init.author.email "you@example.com"
# npm set init.author.url "http://yourblog.com"

Login to NPM and obtain your publish token

# npm adduser

Next steps are to create your package.json

# cd /path/to/your-project
# npm init

If you took on dependencies, then you should install and run pakmager

# npm install -g pakmanager
# pakmanager deps

Edit your package.json and add any deps you forgot about

# vim package.json

Publish your libary

# npm publish ./ --tag beta
# npm publish ./

Additional reading:

  • http://npmjs.org/doc/json.html
  • http://npmjs.org/doc/developers.html
  • http://blog.izs.me/post/1675072029/10-cool-things-you-probably-didnt-realize-npm-could-do

Related Posts

ReactiveUI v7.2.0 released

Learn these three buttons

Announcing ReactiveUI virtual community meetups

ReactiveUI v7.1.0 released

ReactiveUI v7.0.0 released

Semantic Versioning of Xamarin Applications

Announcing Serilog.Sinks.Xamarin

Announcing Cake.Raygun

Announcing Cake.AppleSimulator

Example of Xamarin iOS with Cake