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
adding a new flag --mode for dev and pro #6735
Conversation
🦋 Changeset detectedLatest commit: 22f8e79 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Things that we should cover before merging the PR:
- add the new flag to the CLI (help section);
- make some manual testing check via CLI to make sure it works;
- make sure that this new flag is documented in
docs.astro.build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a heads up that if we're adding a new flag to the CLI, we would also need to document it here: https://docs.astro.build/en/reference/cli-reference/
What are you referring to recording a video? |
It's not necessary unless you want to! Just a mention that you manually tested your new change I think it's enough! We don't test the CLI directly in our testing suite, so it's always best to test it locally to ensure it works as expected. |
I got it, of course I did |
Good to know :) next time you can add this information in the template, under the "Testing" section |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be a minor change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! We keep it blocked until we are ready release a new minor. @wulinsheng123 Did you create a PR in the docs repo with the new flag?
|
Just checking in on whether this is planned to be accepted. An issue has been filed in the docs repo simply stating that we will need documentation to accompany this, but no documentation has been proposed. (Issue: withastro/docs#3024 ) Docs can step in and propose documentation, but we'd rather know that this is going to be accepted first before we do that. 😄 |
Happy to merge! @wulinsheng123 could you please update the PR? There's a file that has conflicts |
Let's hold off on this one for now. I would like to understand the use-case better. It appears to set some internal code that was never intended to be exposed externally. |
Ok, if there is any progress, please tell me because I need to resolve a conflict. |
@matthewp Have you had time to revisit this? |
I was probably the one who pushed for it, as I've seen this work on & off in the past in Astro. I think it makes sense to support custom I notice in Astro internals, we only differentiate between |
I see the use case, but Astro is a bit different and we need to clearly set user expectations of what a So if the user set a |
Largely (and maybe only?) it'll affect the value of The |
Given there's still some unknowns of how/if this should work, I think this warrants a (probably small) RFC where we work through the ideas. We can then reopen this PR if it turns out to be the approach chosen. |
Changes
Fix #6575
adding a new --mode flag for dev and pro.
such as dev
pnpm run dev --mode=test
such as build
pnpm run pnpm --mode=test
Testing
Docs