src/npm.js
function runNpm(deps, options, exec) {
	options = options || {};
	exec = exec || spawnSync;

	const args = [
		options.remove ? 'uninstall' : 'install',
		options.dev ? '--save-dev' : '--save',
	].concat(deps);

	return exec('npm', args, {
		stdio: options.stdio === undefined ? 'inherit' : options.stdio,
		cwd: options.cwd,
	});
}
function runNpm(deps, options, exec) {
	options = options || {};
	exec = exec || spawnSync;

	const args = [
		options.remove ? 'uninstall' : 'install',
		options.dev ? '--save-dev' : '--save',
	].concat(deps);

	return exec('npm', args, {
		stdio: options.stdio === undefined ? 'inherit' : options.stdio,
		cwd: options.cwd,
	});
}
function runNpm ( deps , options , exec ) { options = options || { } ; exec = exec || spawnSync ; const args = [ options . remove ? 'uninstall' : 'install' , options . dev ? '--save-dev' : '--save' , ] . concat ( deps ) ; return exec ( 'npm' , args , { stdio : options . stdio === undefined ? 'inherit' : options . stdio , cwd : options . cwd , } ) ; }
Install given npm packages

@param {Array|string} deps
@param {Object} [options]
@param {boolean} [options.dev=true] --save-dev (--save by default)
@param {boolean} [options.remove=false] uninstall package (install by default)
@param {Function} [exec]
@return {Object}
Install given npm packages