Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
docs: update generate doc to include --dotenv (#9991)
Browse files Browse the repository at this point in the history
  • Loading branch information
huang-julien authored and danielroe committed Jan 21, 2023
1 parent e398a9e commit 64b3f10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/content/1.docs/3.api/5.commands/generate.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ 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`

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.
2 changes: 1 addition & 1 deletion packages/nuxi/src/commands/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 64b3f10

Please sign in to comment.