docs: update generate doc to include --dotenv (#9991)

This commit is contained in:
Julien Huang 2023-01-09 10:25:24 +01:00 committed by GitHub
parent 60c3e2f841
commit 3c7140582b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -6,7 +6,7 @@ description: Pre-renders every route of the application and stores the result in
# `nuxi generate` # `nuxi generate`
```{bash} ```{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` 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 Option | Default | Description
-------------------------|-----------------|------------------ -------------------------|-----------------|------------------
`rootDir` | `.` | The root directory of the application to generate `rootDir` | `.` | The root directory of the application to generate
`--dotenv` | `.` | Point to another `.env` file to load, **relative** to the root directory.

View File

@ -4,7 +4,7 @@ import { defineNuxtCommand } from './index'
export default defineNuxtCommand({ export default defineNuxtCommand({
meta: { meta: {
name: 'generate', name: 'generate',
usage: 'npx nuxi generate [rootDir]', usage: 'npx nuxi generate [rootDir] [--dotenv]',
description: 'Build Nuxt and prerender static routes' description: 'Build Nuxt and prerender static routes'
}, },
async invoke (args) { async invoke (args) {