Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxleiko/exec-npm-install
Calls npm install in a child_process to prevent npm to take too much memory
https://github.com/maxleiko/exec-npm-install
Last synced: 7 days ago
JSON representation
Calls npm install in a child_process to prevent npm to take too much memory
- Host: GitHub
- URL: https://github.com/maxleiko/exec-npm-install
- Owner: maxleiko
- License: mit
- Created: 2015-07-24T11:39:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-08T13:48:27.000Z (about 9 years ago)
- Last Synced: 2024-04-27T06:20:16.545Z (7 months ago)
- Language: JavaScript
- Size: 148 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# exec-npm-install
Calls npm install in a child_process to prevent npm to take too much memory### Usage
```js
var execNpmInstall = require('exec-npm-install');var options = {
// modules to install
modules: [
'kevoree-node-javascript',
'kevoree-comp-ticker',
'kevoree-group-ws'
],
// install path (nb. '/path/to/somewhere' => '/path/to/somewhere/node_modules')
prefix: '/path/to/somewhere'
};execNpmInstall(options, function (err) {
if (err) {
console.log('Error: '+err.message);
} else {
console.log('Install sucess');
}
});
```
> **NB.** When you specify a `prefix`, `npm` will always append to it the `node_modules` folder.