Skip to content

Commit e7f3af5

Browse files
authored
Merge pull request #138 from ember-learn/fix-update-to-use-pnpm-in-generate-script-to-align-with-ember.js
fix: update to use pnpm in generate script to align with ember.js
2 parents 6d2e2a6 + 4f2e77f commit e7f3af5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: generate-local.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ async function runCmd(cmd, path, args = []) {
5252
}
5353

5454
try {
55-
await commandExists('yarn');
55+
await commandExists('pnpm');
5656
} catch (e) {
57-
exit(chalk.red('We need yarn installed globally for this script to work'));
57+
exit(chalk.red('We need pnpm installed globally for this script to work'));
5858
}
5959

6060
let emberProjectPath = path.join('../', 'ember.js');
@@ -70,13 +70,13 @@ let buildDocs = async projDirPath => {
7070
checkIfProjectDirExists(projDirPath);
7171

7272
if (project === 'ember') {
73-
await runCmd('volta', projDirPath, ['run', 'yarn']);
73+
await runCmd('corepack', projDirPath, ['pnpm', 'install']);
7474
} else {
7575
await runCmd('corepack', projDirPath, ['pnpm', 'install']);
7676
}
7777

7878
await runCmd(
79-
project === 'ember' ? 'volta run yarn docs' : 'corepack pnpm run build:docs',
79+
project === 'ember' ? 'corepack pnpm run docs' : 'corepack pnpm run build:docs',
8080
projDirPath,
8181
);
8282

@@ -100,6 +100,6 @@ let dirMap = {
100100

101101
await buildDocs(dirMap[project]);
102102

103-
await execa('volta', ['run', 'yarn', 'start', '--projects', project, '--version', version], {
103+
await execa('pnpm', ['run', 'start', '--projects', project, '--version', version], {
104104
stdio: 'inherit',
105105
});

0 commit comments

Comments
 (0)