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

Rewrite argument handling in @mui/toolpad CLI with yargs #1794

Merged
merged 3 commits into from
Mar 28, 2023

Conversation

bharatkashyap
Copy link
Member

@bharatkashyap bharatkashyap commented Mar 23, 2023

@bharatkashyap bharatkashyap added the core Infrastructure work going on behind the scenes label Mar 23, 2023
@bharatkashyap bharatkashyap changed the title Rewrite argument handling in CLI with yargs Rewrite argument handling in @mui/toolpad CLI with yargs Mar 23, 2023
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.

  • I propose we keep --dev instead of changing it to --next-prod because:
    • prod should be the default, so we need a flag to enable dev mode
    • Let's keep the name --dev to avoid breaking other contributor's workflow.
  • --dev is for Toolpad contributors only, it doesn't have to be documented in the --help command, regular users shouldn't use this flag.
  • Should we do the same for create-toolpad-app?

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 24, 2023
@bharatkashyap
Copy link
Member Author

  • I propose we keep --dev instead of changing it to --next-prod because:

    • prod should be the default, so we need a flag to enable dev mode
    • Let's keep the name --dev to avoid breaking other contributor's workflow.

For me, the only reason to move away from --dev is the confusion it creates with the command of the same name.

  • --dev is for Toolpad contributors only, it doesn't have to be documented in the --help command, regular users shouldn't use this flag.

  • Should we do the same for create-toolpad-app?

Yes, added some thoughts in #1795

@Janpot
Copy link
Member

Janpot commented Mar 24, 2023

For me, the only reason to move away from --dev is the confusion it creates with the command of the same name.

Ok, let's maybe change it to an environment variable TOOLPAD_NEXT_DEV? (we need it for the tests anyway), but not in this PR, let's leave it at --dev for this PR, undocumented.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 27, 2023
@bharatkashyap bharatkashyap merged commit 69f32dc into master Mar 28, 2023
@bharatkashyap bharatkashyap deleted the cli-yargs branch March 28, 2023 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support CLI --help command Getting started with Toolpad to be improved
2 participants