generators/init-product/templates/plain/build.js
function yo(generator, options, cwd) {
  const yeoman = require('yeoman-environment');
  // call yo internally
  const yeomanEnv = yeoman.createEnv([], {cwd, env}, quiet ? createQuietTerminalAdapter() : undefined);
  yeomanEnv.register(require.resolve('generator-phovea/generators/' + generator), 'phovea:' + generator);
  return new Promise((resolve, reject) => {
    try {
      console.log(cwd, chalk.blue('running yo phovea:' + generator));
      yeomanEnv.run('phovea:' + generator, options, resolve);
    } catch (e) {
      console.error('error', e, e.stack);
      reject(e);
    }
  });
}
function yo(generator, options, cwd) {
  const yeoman = require('yeoman-environment');
  // call yo internally
  const yeomanEnv = yeoman.createEnv([], {cwd, env}, quiet ? createQuietTerminalAdapter() : undefined);
  yeomanEnv.register(require.resolve('generator-phovea/generators/' + generator), 'phovea:' + generator);
  return new Promise((resolve, reject) => {
    try {
      console.log(cwd, chalk.blue('running yo phovea:' + generator));
      yeomanEnv.run('phovea:' + generator, options, resolve);
    } catch (e) {
      console.error('error', e, e.stack);
      reject(e);
    }
  });
}
function yo ( generator , options , cwd ) { const yeoman = require ( 'yeoman-environment' ) ; // call yo internally const yeomanEnv = yeoman . createEnv ( [ ] , { cwd , env } , quiet ? createQuietTerminalAdapter ( ) : undefined ) ; yeomanEnv . register ( require . resolve ( 'generator-phovea/generators/' + generator ) , 'phovea:' + generator ) ; return new Promise ( ( resolve , reject ) => { try { console . log ( cwd , chalk . blue ( 'running yo phovea:' + generator ) ) ; yeomanEnv . run ( 'phovea:' + generator , options , resolve ) ; } catch ( e ) { console . error ( 'error' , e , e . stack ) ; reject ( e ) ; } } ) ; }
runs yo internally
@param generator
@param options
@param cwd
runs yo internally