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] Refactor setup #4597

Merged
merged 5 commits into from
Jan 23, 2025
Merged

Conversation

bharatkashyap
Copy link
Member

@bharatkashyap bharatkashyap added the create-toolpad-app Issues related to the `create-toolpad-app` CLI tool label Jan 12, 2025
@mui-bot
Copy link

mui-bot commented Jan 12, 2025

Netlify deploy preview

https://deploy-preview-4597--mui-toolpad-docs.netlify.app/

Generated by 🚫 dangerJS against 024be1e

@bharatkashyap bharatkashyap requested a review from Janpot January 14, 2025 07:58
// eslint-disable-next-line no-console
console.log();

const pkg = await findCtaPackageJson();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to remove this call and pass the version as an option.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we remove the call, how would we set the default value of the version in case nothing is passed in the version option?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is no sensible default, then you make the option mandatory

return 'pnpm';
}

export async function findCtaPackageJson() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There exist package json types in this workspace already. Should add a return type here.

Copy link
Member

@Janpot Janpot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few small suggestions. Otherwise seems to be good. 👍

@bharatkashyap bharatkashyap merged commit ca6354f into mui:master Jan 23, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-toolpad-app Issues related to the `create-toolpad-app` CLI tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[cli] Fails to install example when passing a directory
3 participants