Skip to content

Commit 8093cdb

Browse files
authored
Merge pull request #142 from runspired/streamline-docs-gen
feat: enable skipping install
2 parents c46005e + e0a9abe commit 8093cdb

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Diff for: generate-local.js

+8-5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ function semverVersion(value) {
2525
}
2626

2727
program
28+
.addOption(new Option('--skip-install', 'skip the installation of dependencies'))
2829
.addOption(
2930
new Option('-p, --project <project>', 'the project that you want to run this for')
3031
.choices(['ember', 'ember-data'])
@@ -36,7 +37,7 @@ program.parse();
3637

3738
const options = program.opts();
3839

39-
const { project, version } = options;
40+
const { project, version, skipInstall } = options;
4041

4142
async function runCmd(cmd, path, args = []) {
4243
console.log(chalk.underline(`Running '${chalk.green(cmd)}' in ${path}`));
@@ -69,10 +70,12 @@ let checkIfProjectDirExists = dirPath => {
6970
let buildDocs = async projDirPath => {
7071
checkIfProjectDirExists(projDirPath);
7172

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

7881
await runCmd(

0 commit comments

Comments
 (0)