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" ...

Get Node Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.