diff options
Diffstat (limited to '')
-rw-r--r-- | .changeset/eleven-olives-train.md | 5 | ||||
-rw-r--r-- | packages/astro/src/cli/build/index.ts | 1 | ||||
-rw-r--r-- | packages/astro/src/cli/flags.ts | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/.changeset/eleven-olives-train.md b/.changeset/eleven-olives-train.md new file mode 100644 index 000000000..4f393068a --- /dev/null +++ b/.changeset/eleven-olives-train.md @@ -0,0 +1,5 @@ +--- +'astro': minor +--- + +Adds support for an `--outDir` CLI flag to `astro build` diff --git a/packages/astro/src/cli/build/index.ts b/packages/astro/src/cli/build/index.ts index dd44823d1..8919dfc40 100644 --- a/packages/astro/src/cli/build/index.ts +++ b/packages/astro/src/cli/build/index.ts @@ -15,6 +15,7 @@ export async function build({ flags }: BuildOptions) { tables: { Flags: [ ['--drafts', `Include Markdown draft pages in the build.`], + ['--outDir <directory>', `Specify the output directory for the build.`], ['--help (-h)', 'See all available flags.'], ], }, diff --git a/packages/astro/src/cli/flags.ts b/packages/astro/src/cli/flags.ts index 54177e998..c97f1801a 100644 --- a/packages/astro/src/cli/flags.ts +++ b/packages/astro/src/cli/flags.ts @@ -14,6 +14,7 @@ export function flagsToAstroInlineConfig(flags: Flags): AstroInlineConfig { root: typeof flags.root === 'string' ? flags.root : undefined, site: typeof flags.site === 'string' ? flags.site : undefined, base: typeof flags.base === 'string' ? flags.base : undefined, + outDir: typeof flags.outDir === 'string' ? flags.outDir : undefined, markdown: { drafts: typeof flags.drafts === 'boolean' ? flags.drafts : undefined, }, |