lib/config/dependencies.js
function install(ids) {
  if (!ids || !ids.length) return;

  const missingDependencies = ids.filter(id => find(id) == '');

  if (missingDependencies.length) {
    try {
      const cmd = useNPM
        ? `npm --save-dev --save-exact install ${missingDependencies.join(' ')}`
        : `yarn add --dev --exact ${missingDependencies.join(' ')}`;

      print('installing the following missing dependencies:', 0);
      missingDependencies.forEach(id => {
        print(strong(id), 1);
      });
      exec(cmd);
    } catch (err) {
      error(err);
    }
  }
}
function install(ids) {
  if (!ids || !ids.length) return;

  const missingDependencies = ids.filter(id => find(id) == '');

  if (missingDependencies.length) {
    try {
      const cmd = useNPM
        ? `npm --save-dev --save-exact install ${missingDependencies.join(' ')}`
        : `yarn add --dev --exact ${missingDependencies.join(' ')}`;

      print('installing the following missing dependencies:', 0);
      missingDependencies.forEach(id => {
        print(strong(id), 1);
      });
      exec(cmd);
    } catch (err) {
      error(err);
    }
  }
}
function install ( ids ) { if ( ! ids || ! ids . length ) return ; const missingDependencies = ids . filter ( id => find ( id ) == '' ) ; if ( missingDependencies . length ) { try { const cmd = useNPM ? ` ${ missingDependencies . join ( ' ' ) } ` : ` ${ missingDependencies . join ( ' ' ) } ` ; print ( 'installing the following missing dependencies:' , 0 ) ; missingDependencies . forEach ( id => { print ( strong ( id ) , 1 ) ; } ) ; exec ( cmd ) ; } catch ( err ) { error ( err ) ; } } }
Install dependencies based on 'ids'
@param {Array} ids
Install dependencies based on ids