Skip to content

Commit

Permalink
fix(gatsby-cli): don't fail when using --log-pages and/or `--write-…
Browse files Browse the repository at this point in the history
…to-file` (#23951)

* Adding new cli options for page optimization

* prettier

* make them hidden, add some description as well as comment about why they are hidden

Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
  • Loading branch information
albertlincoln and pieh authored May 11, 2020
1 parent 88056f0 commit f7dc43f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/gatsby-cli/src/create-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,20 @@ function buildLocalCommands(cli, isLocalSite) {
.option(`open-tracing-config-file`, {
type: `string`,
describe: `Tracer configuration file (OpenTracing compatible). See https://gatsby.dev/tracing`,
})
// log-pages and write-to-file are specific to experimental GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES feature
// because of that they are hidden from `--help` but still defined so `yargs` know about them
.option(`log-pages`, {
type: `boolean`,
default: false,
describe: `Log the pages that changes since last build (only available when using GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES).`,
hidden: true,
})
.option(`write-to-file`, {
type: `boolean`,
default: false,
describe: `Save the log of changed pages for future comparison (only available when using GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES).`,
hidden: true,
}),
handler: handlerP(
getCommandHandler(`build`, (args, cmd) => {
Expand Down

0 comments on commit f7dc43f

Please sign in to comment.