lib/npm-install.js
function npmInstall(settings) {
  const message = logger.promise('Running npm install (can take several minutes)');

  const installArgs = {};

  if (settings) {
    if (settings.path) {
      installArgs.cwd = settings.path;
    }

    if (settings.stdio) {
      installArgs.stdio = settings.stdio;
    }
  }

  const npmProcess = spawn('npm', ['install'], installArgs);

  return new Promise((resolve, reject) => {
    npmProcess.on('exit', (code) => {
      if (code !== 0) {
        message.fail();
        reject('npm install failed.');
        return;
      }

      message.succeed();
      resolve();
    });
  });
}
function npmInstall(settings) {
  const message = logger.promise('Running npm install (can take several minutes)');

  const installArgs = {};

  if (settings) {
    if (settings.path) {
      installArgs.cwd = settings.path;
    }

    if (settings.stdio) {
      installArgs.stdio = settings.stdio;
    }
  }

  const npmProcess = spawn('npm', ['install'], installArgs);

  return new Promise((resolve, reject) => {
    npmProcess.on('exit', (code) => {
      if (code !== 0) {
        message.fail();
        reject('npm install failed.');
        return;
      }

      message.succeed();
      resolve();
    });
  });
}
function npmInstall ( settings ) { const message = logger . promise ( 'Running npm install (can take several minutes)' ) ; const installArgs = { } ; if ( settings ) { if ( settings . path ) { installArgs . cwd = settings . path ; } if ( settings . stdio ) { installArgs . stdio = settings . stdio ; } } const npmProcess = spawn ( 'npm' , [ 'install' ] , installArgs ) ; return new Promise ( ( resolve , reject ) => { npmProcess . on ( 'exit' , ( code ) => { if ( code !== 0 ) { message . fail ( ) ; reject ( 'npm install failed.' ) ; return ; } message . succeed ( ) ; resolve ( ) ; } ) ; } ) ; }
Runs npm install for a specific package
@name npmInstall
Runs npm install for a specific package