Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update to use pnpm in generate script to align with ember.js #138

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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',
});