Skip to content

Commit

Permalink
Merge pull request #138 from ember-learn/fix-update-to-use-pnpm-in-ge…
Browse files Browse the repository at this point in the history
…nerate-script-to-align-with-ember.js

fix: update to use pnpm in generate script to align with ember.js
  • Loading branch information
jaredgalanis authored Mar 10, 2024
2 parents 6d2e2a6 + 4f2e77f commit e7f3af5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions generate-local.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ async function runCmd(cmd, path, args = []) {
}

try {
await commandExists('yarn');
await commandExists('pnpm');
} catch (e) {
exit(chalk.red('We need yarn installed globally for this script to work'));
exit(chalk.red('We need pnpm installed globally for this script to work'));
}

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

if (project === 'ember') {
await runCmd('volta', projDirPath, ['run', 'yarn']);
await runCmd('corepack', projDirPath, ['pnpm', 'install']);
} else {
await runCmd('corepack', projDirPath, ['pnpm', 'install']);
}

await runCmd(
project === 'ember' ? 'volta run yarn docs' : 'corepack pnpm run build:docs',
project === 'ember' ? 'corepack pnpm run docs' : 'corepack pnpm run build:docs',
projDirPath,
);

Expand All @@ -100,6 +100,6 @@ let dirMap = {

await buildDocs(dirMap[project]);

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

0 comments on commit e7f3af5

Please sign in to comment.