Skip to content

Commit 3a401b4

Browse files
committed
feat: enable skipping install
1 parent c46005e commit 3a401b4

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

generate-local.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ function semverVersion(value) {
2525
}
2626

2727
program
28+
.addOption(
29+
new Option('--skip-install', 'skip the installation of dependencies')
30+
)
2831
.addOption(
2932
new Option('-p, --project <project>', 'the project that you want to run this for')
3033
.choices(['ember', 'ember-data'])
@@ -36,7 +39,7 @@ program.parse();
3639

3740
const options = program.opts();
3841

39-
const { project, version } = options;
42+
const { project, version, skipInstall } = options;
4043

4144
async function runCmd(cmd, path, args = []) {
4245
console.log(chalk.underline(`Running '${chalk.green(cmd)}' in ${path}`));
@@ -69,10 +72,12 @@ let checkIfProjectDirExists = dirPath => {
6972
let buildDocs = async projDirPath => {
7073
checkIfProjectDirExists(projDirPath);
7174

72-
if (project === 'ember') {
73-
await runCmd('corepack', projDirPath, ['pnpm', 'install']);
74-
} else {
75-
await runCmd('corepack', projDirPath, ['pnpm', 'install']);
75+
if (!skipInstall) {
76+
if (project === 'ember') {
77+
await runCmd('corepack', projDirPath, ['pnpm', 'install']);
78+
} else {
79+
await runCmd('corepack', projDirPath, ['pnpm', 'install']);
80+
}
7681
}
7782

7883
await runCmd(

0 commit comments

Comments
 (0)