From e0b41789ffaddf5b7c1dae3918ccaa1cce495aa3 Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Wed, 11 Oct 2023 17:05:32 +0200 Subject: [PATCH 1/3] Add support for an `--outDir` CLI flag to `astro build` --- packages/astro/src/cli/build/index.ts | 1 + packages/astro/src/cli/flags.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/astro/src/cli/build/index.ts b/packages/astro/src/cli/build/index.ts index dd44823d1427..8919dfc40976 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 ', `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 54177e998585..c97f1801acf1 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, }, From d30e829d5eab6d334bb1aa0e519f71215f4536c0 Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Wed, 11 Oct 2023 17:09:23 +0200 Subject: [PATCH 2/3] Add changeset --- .changeset/eleven-olives-train.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/eleven-olives-train.md diff --git a/.changeset/eleven-olives-train.md b/.changeset/eleven-olives-train.md new file mode 100644 index 000000000000..cf9a9c29ca57 --- /dev/null +++ b/.changeset/eleven-olives-train.md @@ -0,0 +1,5 @@ +--- +'astro': minor +--- + +Add support for an `--outDir` CLI flag to `astro build` From 5ade4817e513d57ac636bee0dfb8342f84a1bfe6 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Wed, 11 Oct 2023 11:10:05 -0500 Subject: [PATCH 3/3] Update .changeset/eleven-olives-train.md Co-authored-by: Sarah Rainsberger --- .changeset/eleven-olives-train.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/eleven-olives-train.md b/.changeset/eleven-olives-train.md index cf9a9c29ca57..4f393068aff2 100644 --- a/.changeset/eleven-olives-train.md +++ b/.changeset/eleven-olives-train.md @@ -2,4 +2,4 @@ 'astro': minor --- -Add support for an `--outDir` CLI flag to `astro build` +Adds support for an `--outDir` CLI flag to `astro build`