@nuxt/docs-nightly 4.1.3-29316243.a52ce9a5 → 4.1.3-29317678.57a965fe
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3.api/4.commands/add.md +1 -1
- package/3.api/4.commands/analyze.md +2 -1
- package/3.api/4.commands/build.md +2 -1
- package/3.api/4.commands/dev.md +5 -4
- package/3.api/4.commands/generate.md +2 -1
- package/3.api/4.commands/init.md +3 -2
- package/3.api/4.commands/module.md +2 -2
- package/3.api/4.commands/prepare.md +2 -1
- package/3.api/4.commands/preview.md +3 -2
- package/3.api/4.commands/test.md +40 -0
- package/3.api/4.commands/typecheck.md +3 -1
- package/3.api/4.commands/upgrade.md +3 -3
- package/package.json +1 -1
package/3.api/4.commands/add.md
CHANGED
|
@@ -19,7 +19,7 @@ npx nuxt add <TEMPLATE> <NAME> [--cwd=<directory>] [--logLevel=<silent|info|verb
|
|
|
19
19
|
<!--add-args-->
|
|
20
20
|
Argument | Description
|
|
21
21
|
--- | ---
|
|
22
|
-
`TEMPLATE` | Specify which template to generate (options: <api\|
|
|
22
|
+
`TEMPLATE` | Specify which template to generate (options: <api\|app\|app-config\|component\|composable\|error\|layer\|layout\|middleware\|module\|page\|plugin\|server-middleware\|server-plugin\|server-route\|server-util>)
|
|
23
23
|
`NAME` | Specify name of the generated file
|
|
24
24
|
<!--/add-args-->
|
|
25
25
|
|
|
@@ -10,7 +10,7 @@ links:
|
|
|
10
10
|
|
|
11
11
|
<!--analyze-cmd-->
|
|
12
12
|
```bash [Terminal]
|
|
13
|
-
npx nuxt analyze [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--dotenv] [--name=<name>] [--no-serve]
|
|
13
|
+
npx nuxt analyze [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--dotenv] [-e, --extends=<layer-name>] [--name=<name>] [--no-serve]
|
|
14
14
|
```
|
|
15
15
|
<!--/analyze-cmd-->
|
|
16
16
|
|
|
@@ -32,6 +32,7 @@ Option | Default | Description
|
|
|
32
32
|
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
|
|
33
33
|
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
|
|
34
34
|
`--dotenv` | | Path to `.env` file to load, relative to the root directory
|
|
35
|
+
`-e, --extends=<layer-name>` | | Extend from a Nuxt layer
|
|
35
36
|
`--name=<name>` | `default` | Name of the analysis
|
|
36
37
|
`--no-serve` | | Skip serving the analysis results
|
|
37
38
|
<!--/analyze-opts-->
|
|
@@ -10,7 +10,7 @@ links:
|
|
|
10
10
|
|
|
11
11
|
<!--build-cmd-->
|
|
12
12
|
```bash [Terminal]
|
|
13
|
-
npx nuxt build [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--prerender] [--preset] [--dotenv] [--envName]
|
|
13
|
+
npx nuxt build [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--prerender] [--preset] [--dotenv] [--envName] [-e, --extends=<layer-name>]
|
|
14
14
|
```
|
|
15
15
|
<!--/build-cmd-->
|
|
16
16
|
|
|
@@ -35,6 +35,7 @@ Option | Default | Description
|
|
|
35
35
|
`--preset` | | Nitro server preset
|
|
36
36
|
`--dotenv` | | Path to `.env` file to load, relative to the root directory
|
|
37
37
|
`--envName` | | The environment to use when resolving configuration overrides (default is `production` when building, and `development` when running the dev server)
|
|
38
|
+
`-e, --extends=<layer-name>` | | Extend from a Nuxt layer
|
|
38
39
|
<!--/build-opts-->
|
|
39
40
|
|
|
40
41
|
::note
|
package/3.api/4.commands/dev.md
CHANGED
|
@@ -10,7 +10,7 @@ links:
|
|
|
10
10
|
|
|
11
11
|
<!--dev-cmd-->
|
|
12
12
|
```bash [Terminal]
|
|
13
|
-
npx nuxt dev [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--dotenv] [--envName] [--
|
|
13
|
+
npx nuxt dev [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--dotenv] [--envName] [-e, --extends=<layer-name>] [--clear] [--no-f, --no-fork] [-p, --port] [-h, --host] [--clipboard] [-o, --open] [--https] [--publicURL] [--qr] [--public] [--tunnel] [--sslCert] [--sslKey]
|
|
14
14
|
```
|
|
15
15
|
<!--/dev-cmd-->
|
|
16
16
|
|
|
@@ -33,10 +33,11 @@ Option | Default | Description
|
|
|
33
33
|
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
|
|
34
34
|
`--dotenv` | | Path to `.env` file to load, relative to the root directory
|
|
35
35
|
`--envName` | | The environment to use when resolving configuration overrides (default is `production` when building, and `development` when running the dev server)
|
|
36
|
-
|
|
37
|
-
`--
|
|
36
|
+
`-e, --extends=<layer-name>` | | Extend from a Nuxt layer
|
|
37
|
+
`--clear` | `false` | Clear console on restart
|
|
38
|
+
`--no-f, --no-fork` | | Disable forked mode
|
|
38
39
|
`-p, --port` | | Port to listen on (default: `NUXT_PORT \|\| NITRO_PORT \|\| PORT \|\| nuxtOptions.devServer.port`)
|
|
39
|
-
`-h, --host` | | Host to listen on (default: `NUXT_HOST \|\| NITRO_HOST \|\| HOST \|\| nuxtOptions.
|
|
40
|
+
`-h, --host` | | Host to listen on (default: `NUXT_HOST \|\| NITRO_HOST \|\| HOST \|\| nuxtOptions.devServer?.host`)
|
|
40
41
|
`--clipboard` | `false` | Copy the URL to the clipboard
|
|
41
42
|
`-o, --open` | `false` | Open the URL in the browser
|
|
42
43
|
`--https` | | Enable HTTPS
|
|
@@ -10,7 +10,7 @@ links:
|
|
|
10
10
|
|
|
11
11
|
<!--generate-cmd-->
|
|
12
12
|
```bash [Terminal]
|
|
13
|
-
npx nuxt generate [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--preset] [--dotenv] [--envName]
|
|
13
|
+
npx nuxt generate [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--preset] [--dotenv] [--envName] [-e, --extends=<layer-name>]
|
|
14
14
|
```
|
|
15
15
|
<!--/generate-cmd-->
|
|
16
16
|
|
|
@@ -34,6 +34,7 @@ Option | Default | Description
|
|
|
34
34
|
`--preset` | | Nitro server preset
|
|
35
35
|
`--dotenv` | | Path to `.env` file to load, relative to the root directory
|
|
36
36
|
`--envName` | | The environment to use when resolving configuration overrides (default is `production` when building, and `development` when running the dev server)
|
|
37
|
+
`-e, --extends=<layer-name>` | | Extend from a Nuxt layer
|
|
37
38
|
<!--/generate-opts-->
|
|
38
39
|
|
|
39
40
|
::read-more{to="/docs/4.x/getting-started/deployment#static-hosting"}
|
package/3.api/4.commands/init.md
CHANGED
|
@@ -10,7 +10,7 @@ links:
|
|
|
10
10
|
|
|
11
11
|
<!--init-cmd-->
|
|
12
12
|
```bash [Terminal]
|
|
13
|
-
npm create nuxt@latest [DIR] [--cwd=<directory>] [-t, --template] [-f, --force] [--offline] [--preferOffline] [--no-install] [--gitInit] [--shell] [--packageManager] [--nightly]
|
|
13
|
+
npm create nuxt@latest [DIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [-t, --template] [-f, --force] [--offline] [--preferOffline] [--no-install] [--gitInit] [--shell] [--packageManager] [-M, --modules] [--no-modules] [--nightly]
|
|
14
14
|
```
|
|
15
15
|
<!--/init-cmd-->
|
|
16
16
|
|
|
@@ -30,6 +30,7 @@ Argument | Description
|
|
|
30
30
|
Option | Default | Description
|
|
31
31
|
--- | --- | ---
|
|
32
32
|
`--cwd=<directory>` | `.` | Specify the working directory
|
|
33
|
+
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
|
|
33
34
|
`-t, --template` | | Template name
|
|
34
35
|
`-f, --force` | | Override existing directory
|
|
35
36
|
`--offline` | | Force offline mode
|
|
@@ -38,7 +39,7 @@ Option | Default | Description
|
|
|
38
39
|
`--gitInit` | | Initialize git repository
|
|
39
40
|
`--shell` | | Start shell after installation in project directory
|
|
40
41
|
`--packageManager` | | Package manager choice (npm, pnpm, yarn, bun)
|
|
41
|
-
|
|
42
|
+
`-M, --modules` | | Nuxt modules to install (comma separated without spaces)
|
|
42
43
|
`--no-modules` | | Skip module installation prompt
|
|
43
44
|
`--nightly` | | Use Nuxt nightly release channel (3x or latest)
|
|
44
45
|
<!--/init-opts-->
|
|
@@ -21,7 +21,7 @@ npx nuxt module add <MODULENAME> [--cwd=<directory>] [--logLevel=<silent|info|ve
|
|
|
21
21
|
<!--module-add-args-->
|
|
22
22
|
Argument | Description
|
|
23
23
|
--- | ---
|
|
24
|
-
`MODULENAME` |
|
|
24
|
+
`MODULENAME` | Specify one or more modules to install by name, separated by spaces
|
|
25
25
|
<!--/module-add-args-->
|
|
26
26
|
|
|
27
27
|
<!--module-add-opts-->
|
|
@@ -31,7 +31,7 @@ Option | Default | Description
|
|
|
31
31
|
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
|
|
32
32
|
`--skipInstall` | | Skip npm install
|
|
33
33
|
`--skipConfig` | | Skip nuxt.config.ts update
|
|
34
|
-
`--dev` | | Install
|
|
34
|
+
`--dev` | | Install modules as dev dependencies
|
|
35
35
|
<!--/module-add-opts-->
|
|
36
36
|
|
|
37
37
|
The command lets you install [Nuxt modules](/modules) in your application with no manual work.
|
|
@@ -10,7 +10,7 @@ links:
|
|
|
10
10
|
|
|
11
11
|
<!--prepare-cmd-->
|
|
12
12
|
```bash [Terminal]
|
|
13
|
-
npx nuxt prepare [ROOTDIR] [--dotenv] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--envName]
|
|
13
|
+
npx nuxt prepare [ROOTDIR] [--dotenv] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--envName] [-e, --extends=<layer-name>]
|
|
14
14
|
```
|
|
15
15
|
<!--/prepare-cmd-->
|
|
16
16
|
|
|
@@ -33,6 +33,7 @@ Option | Default | Description
|
|
|
33
33
|
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
|
|
34
34
|
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
|
|
35
35
|
`--envName` | | The environment to use when resolving configuration overrides (default is `production` when building, and `development` when running the dev server)
|
|
36
|
+
`-e, --extends=<layer-name>` | | Extend from a Nuxt layer
|
|
36
37
|
<!--/prepare-opts-->
|
|
37
38
|
|
|
38
39
|
::note
|
|
@@ -10,7 +10,7 @@ links:
|
|
|
10
10
|
|
|
11
11
|
<!--preview-cmd-->
|
|
12
12
|
```bash [Terminal]
|
|
13
|
-
npx nuxt preview [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--envName] [--
|
|
13
|
+
npx nuxt preview [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--envName] [-e, --extends=<layer-name>] [-p, --port] [--dotenv]
|
|
14
14
|
```
|
|
15
15
|
<!--/preview-cmd-->
|
|
16
16
|
|
|
@@ -32,8 +32,9 @@ Option | Default | Description
|
|
|
32
32
|
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
|
|
33
33
|
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
|
|
34
34
|
`--envName` | | The environment to use when resolving configuration overrides (default is `production` when building, and `development` when running the dev server)
|
|
35
|
+
`-e, --extends=<layer-name>` | | Extend from a Nuxt layer
|
|
36
|
+
`-p, --port` | | Port to listen on (use `PORT` environment variable to override)
|
|
35
37
|
`--dotenv` | | Path to `.env` file to load, relative to the root directory
|
|
36
|
-
`-p, --port` | | Port to listen on (default: `NUXT_PORT \|\| NITRO_PORT \|\| PORT`)
|
|
37
38
|
<!--/preview-opts-->
|
|
38
39
|
|
|
39
40
|
This command sets `process.env.NODE_ENV` to `production`. To override, define `NODE_ENV` in a `.env` file or as command-line argument.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nuxt test"
|
|
3
|
+
description: The test command runs tests using @nuxt/test-utils.
|
|
4
|
+
links:
|
|
5
|
+
- label: Source
|
|
6
|
+
icon: i-simple-icons-github
|
|
7
|
+
to: https://github.com/nuxt/cli/blob/main/packages/nuxi/src/commands/test.ts
|
|
8
|
+
size: xs
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<!--test-cmd-->
|
|
12
|
+
```bash [Terminal]
|
|
13
|
+
npx nuxt test [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--dev] [--watch]
|
|
14
|
+
```
|
|
15
|
+
<!--/test-cmd-->
|
|
16
|
+
|
|
17
|
+
The `test` command runs tests using [`@nuxt/test-utils`](/docs/getting-started/testing). This command sets `process.env.NODE_ENV` to `test` if not already set.
|
|
18
|
+
|
|
19
|
+
## Arguments
|
|
20
|
+
|
|
21
|
+
<!--test-args-->
|
|
22
|
+
Argument | Description
|
|
23
|
+
--- | ---
|
|
24
|
+
`ROOTDIR="."` | Specifies the working directory (default: `.`)
|
|
25
|
+
<!--/test-args-->
|
|
26
|
+
|
|
27
|
+
## Options
|
|
28
|
+
|
|
29
|
+
<!--test-opts-->
|
|
30
|
+
Option | Default | Description
|
|
31
|
+
--- | --- | ---
|
|
32
|
+
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
|
|
33
|
+
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
|
|
34
|
+
`--dev` | | Run in dev mode
|
|
35
|
+
`--watch` | | Watch mode
|
|
36
|
+
<!--/test-opts-->
|
|
37
|
+
|
|
38
|
+
::note
|
|
39
|
+
This command sets `process.env.NODE_ENV` to `test`.
|
|
40
|
+
::
|
|
@@ -10,7 +10,7 @@ links:
|
|
|
10
10
|
|
|
11
11
|
<!--typecheck-cmd-->
|
|
12
12
|
```bash [Terminal]
|
|
13
|
-
npx nuxt typecheck [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>]
|
|
13
|
+
npx nuxt typecheck [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--dotenv] [-e, --extends=<layer-name>]
|
|
14
14
|
```
|
|
15
15
|
<!--/typecheck-cmd-->
|
|
16
16
|
|
|
@@ -31,6 +31,8 @@ Option | Default | Description
|
|
|
31
31
|
--- | --- | ---
|
|
32
32
|
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
|
|
33
33
|
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
|
|
34
|
+
`--dotenv` | | Path to `.env` file to load, relative to the root directory
|
|
35
|
+
`-e, --extends=<layer-name>` | | Extend from a Nuxt layer
|
|
34
36
|
<!--/typecheck-opts-->
|
|
35
37
|
|
|
36
38
|
::note
|
|
@@ -10,7 +10,7 @@ links:
|
|
|
10
10
|
|
|
11
11
|
<!--upgrade-cmd-->
|
|
12
12
|
```bash [Terminal]
|
|
13
|
-
npx nuxt upgrade [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--dedupe] [-f, --force] [-ch, --channel=<stable|nightly>]
|
|
13
|
+
npx nuxt upgrade [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--dedupe] [-f, --force] [-ch, --channel=<stable|nightly|v3|v4|v4-nightly|v3-nightly>]
|
|
14
14
|
```
|
|
15
15
|
<!--/upgrade-cmd-->
|
|
16
16
|
|
|
@@ -31,7 +31,7 @@ Option | Default | Description
|
|
|
31
31
|
--- | --- | ---
|
|
32
32
|
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
|
|
33
33
|
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
|
|
34
|
-
`--dedupe` | |
|
|
34
|
+
`--dedupe` | | Dedupe dependencies after upgrading
|
|
35
35
|
`-f, --force` | | Force upgrade to recreate lockfile and node_modules
|
|
36
|
-
`-ch, --channel=<stable\|nightly>` | `stable` | Specify a channel to install from (default: stable)
|
|
36
|
+
`-ch, --channel=<stable\|nightly\|v3\|v4\|v4-nightly\|v3-nightly>` | `stable` | Specify a channel to install from (default: stable)
|
|
37
37
|
<!--/upgrade-opts-->
|