enpeem
Lightweight wrapper for accessing npm programmatically (alternative to adding npm
as a dependency)
require('npm')
seems like a good idea, but it adds tons of weight to your module, since it takes a long time to install. Why not use the npm
your users already have?
NOTE: re:
cache-min
, see: https://github.com/isaacs/npm/issues/2568#issuecomment-30626394 re:loglevel
, see: https://github.com/isaacs/npm/pull/4320
Usage
$ npm install enpeem --save
var npm = ;
npm install
npm;
The
dir
optionThe
dir
option controls where the NPM package will be installed as a dependency. Ifdir
is unspecified, it defaults to the current working directory. Ifdir
is a relative path, it will be resolved relative to the current working directory.
npm update
npm;