INNER CODE UNIT · JavaScript
runYo
yeoman/yo · lib/cli.js:182
function runYo(env) {
const adapter = new TerminalAdapter();
const router = new Router({adapter, env});
router.registerRoute('help', routes.help);
router.registerRoute('update', routes.update);
router.registerRoute('run', routes.run);
router.registerRoute('install', routes.install);
router.registerRoute('exit', routes.exit);
router.registerRoute('clearConfig', routes.clearConfig);
router.registerRoute('home', routes.home);
process.once('exit', router.navigate.bind(router, 'exit'));
router.updateAvailableGenerators();
return router.navigate('home');
}
rootCheck('\n' + chalk.red('Easy with the `sudo`. Yeoman is the master around here.') + '\n\nSince yo is a user command, there is no need to execute it with root\npermissions. If you\'re having permission errors when using yo without sudo,\nplease spend a few minutes learning more about how your system should work\nand make any necessary repairs.\n\nA quick solution would be to change where npm stores global packages by\nputting ~/npm/bin in your PATH and running:\n' + chalk.blue('npm config set prefix ~/npm') + '\n\nSee: https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md');