diff --git a/packages/pages/src/build/build.ts b/packages/pages/src/build/build.ts index 00bbc93d9..f52c5765a 100644 --- a/packages/pages/src/build/build.ts +++ b/packages/pages/src/build/build.ts @@ -6,7 +6,7 @@ export const buildCommand = (program: Command) => { .command("build") .description("Build site using Vite") .option( - "scope ", + "--scope ", "The subfolder to scope the served templates from" ) .action(async (options) => { diff --git a/packages/pages/src/dev/dev.ts b/packages/pages/src/dev/dev.ts index b30b63468..b3e0c99b0 100644 --- a/packages/pages/src/dev/dev.ts +++ b/packages/pages/src/dev/dev.ts @@ -12,23 +12,33 @@ export const devCommand = (program: Command) => { "Creates features.json, generates test data, " + "and runs a custom local development server that is backed by Vite." ) - .option("local, noGenTestData", "Disables dynamically generated test data") .option( - "scope ", + "--scope ", "The subfolder to scope the served templates from" ) + .option("--local", "Disables dynamically generated test data") .option( - "prod-url", + "--prod-url", "Use production URLs, instead of /[template-name]/[external-id]", true ) .option( - "open-browser", + "--no-prod-url", + "Use local URLs, such as /[template-name]/[external-id]", + false + ) + .option( + "--open-browser", "Automatically opens the browser on server start-up", true ) - .option("noInit", "Disables automatic yext init with .yextrc file") - .option("noGenFeatures", "Disable feature.json generation step") + .option( + "--no-open-browser", + "Do not open the browser on server start-up", + false + ) + .option("--noInit", "Disables automatic yext init with .yextrc file") + .option("--noGenFeatures", "Disable feature.json generation step") .action(async (options) => { if (!options.noInit) { await autoYextInit(); diff --git a/packages/pages/src/generate/ci/ci.ts b/packages/pages/src/generate/ci/ci.ts index ef8ee4353..73797b440 100644 --- a/packages/pages/src/generate/ci/ci.ts +++ b/packages/pages/src/generate/ci/ci.ts @@ -12,7 +12,7 @@ export const ciCommand = (program: Command) => { .command("ci") .description("Generates ci.json file") .option( - "scope ", + "--scope ", "The subfolder to scope the served templates from" ) .action((options, command) => { diff --git a/packages/pages/src/generate/features/features.ts b/packages/pages/src/generate/features/features.ts index 83fa99179..81fbca868 100644 --- a/packages/pages/src/generate/features/features.ts +++ b/packages/pages/src/generate/features/features.ts @@ -11,7 +11,7 @@ export const featureCommand = (program: Command) => { .command("features") .description("Generates features.json file") .option( - "scope ", + "--scope ", "The subfolder to scope the served templates from" ) .action(async (options, command) => { diff --git a/packages/pages/src/prod/prod.ts b/packages/pages/src/prod/prod.ts index 2b04aeb11..21f2ed0a0 100644 --- a/packages/pages/src/prod/prod.ts +++ b/packages/pages/src/prod/prod.ts @@ -5,8 +5,8 @@ export const prodCommand = (program: Command) => { program .command("prod") .description("Runs a custom local production server") - .option("noBuild", "Disable build step") - .option("noRender", "Disable render step") + .option("--noBuild", "Disable build step") + .option("--noRender", "Disable render step") .action(async (options) => { const commandName = "yext pages"; if (!options.noBuild) await runSubprocess(commandName, ["build"]);