Skip to content

Commit

Permalink
update --USE_REDIS flag to true boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
tjheffner committed Jan 2, 2024
1 parent 7e14d08 commit b148cbd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build:preview": "yarn build:env-loader && node ./scripts/yarn/build:preview.js",
"build:sitemap": "yarn build:env-loader & node ./scripts/yarn/build:sitemap.js",
"start": "yarn build:env-loader && node ./scripts/yarn/start.js",
"export": "yarn build:env-loader && node ./scripts/yarn/export.js --USE_REDIS=true",
"export": "yarn build:env-loader && node ./scripts/yarn/export.js --USE_REDIS",
"export:serve": "http-server out -p 8001",
"redis": "docker run --name next-redis -p 6379:6379 -d redis",
"redis:cli": "docker exec -it next-redis redis-cli",
Expand Down
4 changes: 3 additions & 1 deletion packages/env-loader/src/cli-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ const configureAdditionalHelpText = (

/**
* Parses CLI options from the command line into an object.
*
* See https://www.npmjs.com/package/commander#common-option-types-boolean-and-value
*/
export const getCliOptions = (scriptName: string): EnvVars => {
const program = new Command()
Expand All @@ -78,7 +80,7 @@ export const getCliOptions = (scriptName: string): EnvVars => {
.option('--DRUPAL_CLIENT_SECRET <secret>', 'Drupal client secret')
.option('--DRUPAL_PREVIEW_SECRET <secret>', 'Drupal preview secret')
.option('--DRUPAL_SITE_ID <id>', 'Drupal site ID')
.option('--USE_REDIS <boolean>', 'Enable redis')
.option('--USE_REDIS', 'Enable redis')
.option('--REDIS_URL <url>', 'Redis URL')
.option('--SITE_URL <url>', 'Origin used for generated absolute paths')

Expand Down

0 comments on commit b148cbd

Please sign in to comment.