http://podefr.tumblr.com/post/30488475488/locally-test-your-npm-modules-without-publishing
cd /path/to/package.json
Then run the pack command:
npm pack
This will create, in the same directory, a tarball named after the name of the project + the version specified in the package.json.
This is exactly what is published to npmjs.org! You can now see what’s inside
tar -tf packagename-version.tgz
Or you can install it in your project to test it in integration.
cd path/to/your/project/
npm install ../path/to/your/npm/packagename-version.tgz