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

[cli] Fix core example #3847

Merged
merged 5 commits into from
Jul 28, 2024
Merged
Changes from 1 commit
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
Next Next commit
fix: Skips install on --example
  • Loading branch information
bharatkashyap committed Jul 26, 2024
commit aedd71d93a750bedb4d2ae381cba2b2b6e024fb9
13 changes: 13 additions & 0 deletions packages/create-toolpad-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,19 @@ const run = async () => {
// If the user has provided an example, download and extract it
if (args.example) {
await downloadAndExtractExample(absolutePath, args.example);
// eslint-disable-next-line no-console
console.log(`${chalk.cyan('info')} - Installing dependencies`);
// eslint-disable-next-line no-console
console.log();
await execa(packageManager, ['install'], { stdio: 'inherit', cwd: absolutePath });
// eslint-disable-next-line no-console
console.log();
// eslint-disable-next-line no-console
console.log(
`${chalk.green('success')} - Installed "${args.example}" at ${chalk.cyan(absolutePath)}`,
);
// eslint-disable-next-line no-console
console.log();
}
// If the core flag is set, create a new project with Toolpad Core
else if (coreFlag) {
Expand Down