diff --git a/generate-local.js b/generate-local.js index e16a5a2..2b393e7 100755 --- a/generate-local.js +++ b/generate-local.js @@ -25,6 +25,7 @@ function semverVersion(value) { } program + .addOption(new Option('--skip-install', 'skip the installation of dependencies')) .addOption( new Option('-p, --project ', 'the project that you want to run this for') .choices(['ember', 'ember-data']) @@ -36,7 +37,7 @@ program.parse(); const options = program.opts(); -const { project, version } = options; +const { project, version, skipInstall } = options; async function runCmd(cmd, path, args = []) { console.log(chalk.underline(`Running '${chalk.green(cmd)}' in ${path}`)); @@ -69,10 +70,12 @@ let checkIfProjectDirExists = dirPath => { let buildDocs = async projDirPath => { checkIfProjectDirExists(projDirPath); - if (project === 'ember') { - await runCmd('corepack', projDirPath, ['pnpm', 'install']); - } else { - await runCmd('corepack', projDirPath, ['pnpm', 'install']); + if (!skipInstall) { + if (project === 'ember') { + await runCmd('corepack', projDirPath, ['pnpm', 'install']); + } else { + await runCmd('corepack', projDirPath, ['pnpm', 'install']); + } } await runCmd(