docs: document the add layer command (#30476)

This commit is contained in:
Clément Ollivier 2025-01-06 17:27:39 +01:00 committed by GitHub
parent 88c9f64ec6
commit 728b7e1c25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,7 +19,7 @@ npx nuxi add <TEMPLATE> <NAME> [--cwd=<directory>] [--logLevel=<silent|info|verb
<!--add-args--> <!--add-args-->
Argument | Description Argument | Description
--- | --- --- | ---
`TEMPLATE` | Specify which template to generate (options: <api\|plugin\|component\|composable\|middleware\|layout\|page>) `TEMPLATE` | Specify which template to generate (options: <api\|plugin\|component\|composable\|middleware\|layout\|page\|layer>)
`NAME` | Specify name of the generated file `NAME` | Specify name of the generated file
<!--/add-args--> <!--/add-args-->
@ -103,3 +103,10 @@ npx nuxi add middleware auth
# Generates `server/api/hello.ts` # Generates `server/api/hello.ts`
npx nuxi add api hello npx nuxi add api hello
``` ```
## `nuxi add layer`
```bash [Terminal]
# Generates `layers/subscribe/nuxt.config.ts`
npx nuxi add layer subscribe
```