Skip to content

[cli] Refactor setup - #4597

Merged
bharatkashyap merged 5 commits into
mui:masterfrom
bharatkashyap:fix/cta-example-path
Jan 23, 2025
Merged

[cli] Refactor setup#4597
bharatkashyap merged 5 commits into
mui:masterfrom
bharatkashyap:fix/cta-example-path

Conversation

@bharatkashyap

Copy link
Copy Markdown
Collaborator

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

mui-bot commented Jan 12, 2025

Copy link
Copy Markdown

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
Comment thread packages/create-toolpad-app/src/core.ts Outdated
// eslint-disable-next-line no-console
console.log();

const pkg = await findCtaPackageJson();

Copy link
Copy Markdown
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
Copy Markdown
Collaborator 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
Copy Markdown
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
Copy Markdown
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.

@Janpot Janpot left a comment

Copy link
Copy Markdown
Member

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
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