NPM tricks | Guillermo Rauch's Devthought
NPM tricks | Guillermo Rauch's Devthought
Extracted Page: http://www.devthought.com/2012/02/17/npm-tricks/
I decided to put together a little list of tips and tricks related to NPM you might not know about, that come from my experience working with it daily, in both production and development.
Dev dependencies
Make sure packages that only need to be installed while developing your module, like test frameworks, are included as devDependencies
:
"devDependencies": {
"module": "0.1.0"
}
Introspecting package.json
Starting with Node 0.6, since require()
can read and parse JSON files automatically, you can leverage it to easily introspect package.json
:
// considering the mod
Additional text has been truncated due to copyright reasons. Things without URLs and private things don't get truncated.
- No Things found. alex hasn't shared anything.