npm-i
Install npm modules and dependencies to arbitrary places from code.
const i =// Installs two modules into the `foo` dir// Installs the dependencies in `bar/package.json`
install
$ npm i npm-i
usage
i([name], [options], [cb])
All parameters are optional.
name
is a String
or Array
of module names to be installed.
options
is an Object
storing settings:
path
: aString
to the destination foldersave
: aBoolean
indicating to save topackage.json
as a dependencysaveDev
: aBoolean
indicating to save topackage.json
as a developer dependency