O'Reilly logo

Node Cookbook by David Mark Clements

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Deploying a module to npm

Now that we've created a module, we can share it with the rest of the world using the same integrated tool that we retrieve modules with: npm.

Getting ready

Before we can deploy to npm we need to make a package.json file, so let's do that for our module. In mp3dat, we'll create package.json and add the following code:

{ "author": "David Mark Clements <contact@davidmarkclements.com> (http://davidmarkclements.com)", "name": "mp3dat", "description": "A simple MP3 parser that returns stat infos in a similar style to fs.stat for MP3 files or streams. (MPEG-1 compatible only)", "version": "0.0.1", "homepage": "http://nodecookbook.com/mp3dat", "repository": { "type": "git", "url": "git://github.com/davidmarkclements/mp3dat.git" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required