From 3a401b4d7291d6f2d5a645c94c50f3440d7886cb Mon Sep 17 00:00:00 2001 From: Chris Thoburn Date: Fri, 21 Mar 2025 17:36:01 -0700 Subject: [PATCH 1/2] feat: enable skipping install --- generate-local.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/generate-local.js b/generate-local.js index e16a5a2..bb334fe 100755 --- a/generate-local.js +++ b/generate-local.js @@ -25,6 +25,9 @@ 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 +39,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 +72,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( From e0a9abe3231fd62066a449bb5e616747665c21cc Mon Sep 17 00:00:00 2001 From: Chris Thoburn Date: Fri, 21 Mar 2025 17:39:43 -0700 Subject: [PATCH 2/2] fix prettier --- generate-local.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/generate-local.js b/generate-local.js index bb334fe..2b393e7 100755 --- a/generate-local.js +++ b/generate-local.js @@ -25,9 +25,7 @@ function semverVersion(value) { } program - .addOption( - new Option('--skip-install', 'skip the installation of dependencies') - ) + .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'])