-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add support for an --outDir
CLI flag to astro build
#8808
Conversation
🦋 Changeset detectedLatest commit: cad1013 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.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
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.
Works for me, thanks for the PR!
Co-authored-by: Sarah Rainsberger <[email protected]>
@delucis have you tested this locally at least? |
Yup! I built and packed |
Changes
Passes the value of an
--outDir
CLI flag through to Astro config, so you can set the build output directory from the command line:I also took a look through the other config options that aren’t currently available as CLI flags. Only
srcDir
andpublicDir
felt like potential candidates, but those also both feel like fairly rare options, so chose to only addoutDir
as part of this PR.Testing
There don’t seem to be any tests for
astro build
as far as I can tell? So not sure how to test exactly.Docs
This will need documenting in the CLI reference docs.
/cc @withastro/maintainers-docs for feedback!