From 3c7140582b024e57069c46292bdd318b9ea1c1a5 Mon Sep 17 00:00:00 2001 From: Julien Huang <63512348+huang-julien@users.noreply.github.com> Date: Mon, 9 Jan 2023 10:25:24 +0100 Subject: [PATCH] docs: update `generate` doc to include `--dotenv` (#9991) --- docs/content/1.docs/3.api/5.commands/generate.md | 3 ++- packages/nuxi/src/commands/generate.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/content/1.docs/3.api/5.commands/generate.md b/docs/content/1.docs/3.api/5.commands/generate.md index 4965034a33..596dbc7262 100644 --- a/docs/content/1.docs/3.api/5.commands/generate.md +++ b/docs/content/1.docs/3.api/5.commands/generate.md @@ -6,7 +6,7 @@ description: Pre-renders every route of the application and stores the result in # `nuxi generate` ```{bash} -npx nuxi generate [rootDir] +npx nuxi generate [rootDir] [--dotenv] ``` The `generate` command pre-renders every route of your application and stores the result in plain HTML files that you can deploy on any static hosting services. The command triggers the `nuxi build` command with the `prerender` argument set to `true` @@ -14,3 +14,4 @@ The `generate` command pre-renders every route of your application and stores th Option | Default | Description -------------------------|-----------------|------------------ `rootDir` | `.` | The root directory of the application to generate +`--dotenv` | `.` | Point to another `.env` file to load, **relative** to the root directory. diff --git a/packages/nuxi/src/commands/generate.ts b/packages/nuxi/src/commands/generate.ts index 231103cd3c..cb344e878a 100644 --- a/packages/nuxi/src/commands/generate.ts +++ b/packages/nuxi/src/commands/generate.ts @@ -4,7 +4,7 @@ import { defineNuxtCommand } from './index' export default defineNuxtCommand({ meta: { name: 'generate', - usage: 'npx nuxi generate [rootDir]', + usage: 'npx nuxi generate [rootDir] [--dotenv]', description: 'Build Nuxt and prerender static routes' }, async invoke (args) {