code: 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);
      }
    });
  }
docs: runs yo internally
  @param generator
  @param options
  @param cwd