docs: update nuxi command pages (#30199)

This commit is contained in:
Bobbie Goede 2024-12-18 11:29:56 +01:00 committed by GitHub
parent 8de9c5be50
commit c83507e315
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 349 additions and 99 deletions

View File

@ -8,16 +8,30 @@ links:
size: xs size: xs
--- ---
<!--add-cmd-->
```bash [Terminal] ```bash [Terminal]
npx nuxi add [--cwd] [--force] <TEMPLATE> <NAME> npx nuxi add <TEMPLATE> <NAME> [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--force]
``` ```
<!--/add-cmd-->
Option | Default | Description ### Arguments
-------------------------|-----------------|------------------
`TEMPLATE` | - | Specify a template of the file to be generated. <!--add-args-->
`NAME` | - | Specify a name of the file that will be created. Argument | Description
`--cwd` | `.` | The directory of the target application. --- | ---
`--force` | `false` | Force override file if it already exists. `TEMPLATE` | Specify which template to generate (options: <api\|plugin\|component\|composable\|middleware\|layout\|page>)
`NAME` | Specify name of the generated file
<!--/add-args-->
### Options
<!--add-opts-->
Option | Default | Description
--- | --- | ---
`--cwd=<directory>` | `.` | Specify the working directory
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
`--force` | `false` | Force override file if it already exists
<!--/add-opts-->
**Modifiers:** **Modifiers:**

View File

@ -8,15 +8,33 @@ links:
size: xs size: xs
--- ---
<!--analyze-cmd-->
```bash [Terminal] ```bash [Terminal]
npx nuxi analyze [--log-level] [rootDir] npx nuxi analyze [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--dotenv] [--name=<name>] [--no-serve]
``` ```
<!--/analyze-cmd-->
The `analyze` command builds Nuxt and analyzes the production bundle (experimental). The `analyze` command builds Nuxt and analyzes the production bundle (experimental).
Option | Default | Description ## Arguments
-------------------------|-----------------|------------------
`rootDir` | `.` | The directory of the target application. <!--analyze-args-->
Argument | Description
--- | ---
`ROOTDIR="."` | Specifies the working directory (default: `.`)
<!--/analyze-args-->
## Options
<!--analyze-opts-->
Option | Default | Description
--- | --- | ---
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
`--dotenv` | | Path to `.env` file to load, relative to the root directory
`--name=<name>` | `default` | Name of the analysis
`--no-serve` | | Skip serving the analysis results
<!--/analyze-opts-->
::note ::note
This command sets `process.env.NODE_ENV` to `production`. This command sets `process.env.NODE_ENV` to `production`.

View File

@ -8,17 +8,35 @@ links:
size: xs size: xs
--- ---
<!--build-module-cmd-->
```bash [Terminal] ```bash [Terminal]
npx nuxi build-module [--stub] [rootDir] npx nuxi build-module [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--build] [--stub] [--sourcemap] [--prepare]
``` ```
<!--/build-module-cmd-->
The `build-module` command runs `@nuxt/module-builder` to generate `dist` directory within your `rootDir` that contains the full build for your **nuxt-module**. The `build-module` command runs `@nuxt/module-builder` to generate `dist` directory within your `rootDir` that contains the full build for your **nuxt-module**.
Option | Default | Description ## Arguments
-------------------------|-----------------|------------------
`rootDir` | `.` | The root directory of the module to bundle.
`--stub` | `false` | Stub out your module for development using [jiti](https://github.com/unjs/jiti#jiti). (**note:** This is mainly for development purposes.)
::read-more{to="https://github.com/nuxt/module-builder" icon="i-simple-icons-github" color="gray" target="_blank"} <!--build-module-args-->
Argument | Description
--- | ---
`ROOTDIR="."` | Specifies the working directory (default: `.`)
<!--/build-module-args-->
## Options
<!--build-module-opts-->
Option | Default | Description
--- | --- | ---
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
`--build` | `false` | Build module for distribution
`--stub` | `false` | Stub dist instead of actually building it for development
`--sourcemap` | `false` | Generate sourcemaps
`--prepare` | `false` | Prepare module for local development
<!--/build-module-opts-->
::read-more{to="https://github.com/nuxt/module-builder" icon="i-simple-icons-github" color="gray" target="\_blank"}
Read more about `@nuxt/module-builder`. Read more about `@nuxt/module-builder`.
:: ::

View File

@ -8,19 +8,34 @@ links:
size: xs size: xs
--- ---
<!--build-cmd-->
```bash [Terminal] ```bash [Terminal]
npx nuxi build [--prerender] [--preset] [--dotenv] [--log-level] [rootDir] npx nuxi build [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--prerender] [--preset] [--dotenv] [--envName]
``` ```
<!--/build-cmd-->
The `build` command creates a `.output` directory with all your application, server and dependencies ready for production. The `build` command creates a `.output` directory with all your application, server and dependencies ready for production.
Option | Default | Description ## Arguments
-------------------------|-----------------|------------------
`rootDir` | `.` | The root directory of the application to bundle. <!--build-args-->
`--prerender` | `false` | Pre-render every route of your application. (**note:** This is an experimental flag. The behavior might be changed.) Argument | Description
`--preset` | - | Set a [Nitro preset](https://nitro.unjs.io/deploy#changing-the-deployment-preset) --- | ---
`--dotenv` | `.` | Point to another `.env` file to load, **relative** to the root directory. `ROOTDIR="."` | Specifies the working directory (default: `.`)
`--log-level` | `info` | Specify build-time logging level, allowing `silent` \| `info` \| `verbose`. <!--/build-args-->
## Options
<!--build-opts-->
Option | Default | Description
--- | --- | ---
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
`--prerender` | | Build Nuxt and prerender static routes
`--preset` | | Nitro server preset
`--dotenv` | | Path to `.env` file to load, relative to the root directory
`--envName` | | The environment to use when resolving configuration overrides (default is `production` when building, and `development` when running the dev server)
<!--/build-opts-->
::note ::note
This command sets `process.env.NODE_ENV` to `production`. This command sets `process.env.NODE_ENV` to `production`.

View File

@ -1,6 +1,6 @@
--- ---
title: 'nuxi cleanup' title: 'nuxi cleanup'
description: "Remove common generated Nuxt files and caches." description: 'Remove common generated Nuxt files and caches.'
links: links:
- label: Source - label: Source
icon: i-simple-icons-github icon: i-simple-icons-github
@ -8,16 +8,31 @@ links:
size: xs size: xs
--- ---
<!--cleanup-cmd-->
```bash [Terminal] ```bash [Terminal]
npx nuxi cleanup [rootDir] npx nuxi cleanup [ROOTDIR] [--cwd=<directory>]
``` ```
<!--/cleanup-cmd-->
The `cleanup` command removes common generated Nuxt files and caches, including: The `cleanup` command removes common generated Nuxt files and caches, including:
- `.nuxt` - `.nuxt`
- `.output` - `.output`
- `node_modules/.vite` - `node_modules/.vite`
- `node_modules/.cache` - `node_modules/.cache`
Option | Default | Description ## Arguments
-------------------------|-----------------|------------------
`rootDir` | `.` | The root directory of the project. <!--cleanup-args-->
Argument | Description
--- | ---
`ROOTDIR="."` | Specifies the working directory (default: `.`)
<!--/cleanup-args-->
## Options
<!--cleanup-opts-->
Option | Default | Description
--- | --- | ---
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
<!--/cleanup-opts-->

View File

@ -8,25 +8,45 @@ links:
size: xs size: xs
--- ---
<!--dev-cmd-->
```bash [Terminal] ```bash [Terminal]
npx nuxi dev [rootDir] [--dotenv] [--log-level] [--clipboard] [--open, -o] [--no-clear] [--port, -p] [--host, -h] [--https] [--ssl-cert] [--ssl-key] [--tunnel] npx nuxi dev [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--dotenv] [--envName] [--no-clear] [--no-fork] [-p, --port] [-h, --host] [--clipboard] [-o, --open] [--https] [--publicURL] [--qr] [--public] [--tunnel] [--sslCert] [--sslKey]
``` ```
<!--/dev-cmd-->
The `dev` command starts a development server with hot module replacement at [http://localhost:3000](https://localhost:3000) The `dev` command starts a development server with hot module replacement at [http://localhost:3000](https://localhost:3000)
Option | Default | Description ## Arguments
-------------------------|-----------------|------------------
`rootDir` | `.` | The root directory of the application to serve. <!--dev-args-->
`--dotenv` | `.` | Point to another `.env` file to load, **relative** to the root directory. Argument | Description
`--open, -o` | `false` | Open URL in browser. --- | ---
`--clipboard` | `false` | Copy URL to clipboard. `ROOTDIR="."` | Specifies the working directory (default: `.`)
`--no-clear` | `false` | Does not clear the console after startup. <!--/dev-args-->
`--port, -p` | `3000` | Port to listen.
`--host, -h` | `localhost` | Hostname of the server. ## Options
`--https` | `false` | Listen with `https` protocol with a self-signed certificate by default.
`--ssl-cert` |`null` | Specify a certificate for https. <!--dev-opts-->
`--ssl-key` |`null` | Specify the key for the https certificate. Option | Default | Description
`--tunnel` | `false` | Tunnel your local server to the internet with [unjs/untun](https://github.com/unjs/untun) --- | --- | ---
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
`--dotenv` | | Path to `.env` file to load, relative to the root directory
`--envName` | | The environment to use when resolving configuration overrides (default is `production` when building, and `development` when running the dev server)
`--no-clear` | | Disable clear console on restart
`--no-fork` | | Disable forked mode
`-p, --port` | | Port to listen on (default: `NUXT_PORT \|\| NITRO_PORT \|\| PORT \|\| nuxtOptions.devServer.port`)
`-h, --host` | | Host to listen on (default: `NUXT_HOST \|\| NITRO_HOST \|\| HOST \|\| nuxtOptions._layers?.[0]?.devServer?.host`)
`--clipboard` | `false` | Copy the URL to the clipboard
`-o, --open` | `false` | Open the URL in the browser
`--https` | | Enable HTTPS
`--publicURL` | | Displayed public URL (used for QR code)
`--qr` | | Display The QR code of public URL when available
`--public` | | Listen to all network interfaces
`--tunnel` | | Open a tunnel using https://github.com/unjs/untun
`--sslCert` | | (DEPRECATED) Use `--https.cert` instead.
`--sslKey` | | (DEPRECATED) Use `--https.key` instead.
<!--/dev-opts-->
The port and host can also be set via NUXT_PORT, PORT, NUXT_HOST or HOST environment variables. The port and host can also be set via NUXT_PORT, PORT, NUXT_HOST or HOST environment variables.

View File

@ -8,16 +8,31 @@ links:
size: xs size: xs
--- ---
<!--devtools-cmd-->
```bash [Terminal] ```bash [Terminal]
npx nuxi devtools enable|disable [rootDir] npx nuxi devtools <COMMAND> [ROOTDIR] [--cwd=<directory>]
``` ```
<!--/devtools-cmd-->
Running `nuxi devtools enable` will install the Nuxt DevTools globally, and also enable it within the particular project you are using. It is saved as a preference in your user-level `.nuxtrc`. If you want to remove devtools support for a particular project, you can run `nuxi devtools disable`. Running `nuxi devtools enable` will install the Nuxt DevTools globally, and also enable it within the particular project you are using. It is saved as a preference in your user-level `.nuxtrc`. If you want to remove devtools support for a particular project, you can run `nuxi devtools disable`.
Option | Default | Description ## Arguments
-------------------------|-----------------|------------------
`rootDir` | `.` | The root directory of the app you want to enable devtools for.
::read-more{icon="i-simple-icons-nuxtdotjs" to="https://devtools.nuxt.com" target="_blank"} <!--devtools-args-->
Argument | Description
--- | ---
`COMMAND` | Command to run (options: <enable\|disable>)
`ROOTDIR="."` | Specifies the working directory (default: `.`)
<!--/devtools-args-->
## Options
<!--devtools-opts-->
Option | Default | Description
--- | --- | ---
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
<!--/devtools-opts-->
::read-more{icon="i-simple-icons-nuxtdotjs" to="https://devtools.nuxt.com" target="\_blank"}
Read more about the **Nuxt DevTools**. Read more about the **Nuxt DevTools**.
:: ::

View File

@ -8,16 +8,33 @@ links:
size: xs size: xs
--- ---
<!--generate-cmd-->
```bash [Terminal] ```bash [Terminal]
npx nuxi generate [rootDir] [--dotenv] npx nuxi generate [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--preset] [--dotenv] [--envName]
``` ```
<!--/generate-cmd-->
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`
Option | Default | Description ## Arguments
-------------------------|-----------------|------------------
`rootDir` | `.` | The root directory of the application to generate <!--generate-args-->
`--dotenv` | `.` | Point to another `.env` file to load, **relative** to the root directory. Argument | Description
--- | ---
`ROOTDIR="."` | Specifies the working directory (default: `.`)
<!--/generate-args-->
## Options
<!--generate-opts-->
Option | Default | Description
--- | --- | ---
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
`--preset` | | Nitro server preset
`--dotenv` | | Path to `.env` file to load, relative to the root directory
`--envName` | | The environment to use when resolving configuration overrides (default is `production` when building, and `development` when running the dev server)
<!--/generate-opts-->
::read-more{to="/docs/getting-started/deployment#static-hosting"} ::read-more{to="/docs/getting-started/deployment#static-hosting"}
Read more about pre-rendering and static hosting. Read more about pre-rendering and static hosting.

View File

@ -8,12 +8,26 @@ links:
size: xs size: xs
--- ---
<!--info-cmd-->
```bash [Terminal] ```bash [Terminal]
npx nuxi info [rootDir] npx nuxi info [ROOTDIR] [--cwd=<directory>]
``` ```
<!--/info-cmd-->
The `info` command logs information about the current or specified Nuxt project. The `info` command logs information about the current or specified Nuxt project.
Option | Default | Description ## Arguments
-------------------------|-----------------|------------------
`rootDir` | `.` | The directory of the target application. <!--info-args-->
Argument | Description
--- | ---
`ROOTDIR="."` | Specifies the working directory (default: `.`)
<!--/info-args-->
## Options
<!--info-opts-->
Option | Default | Description
--- | --- | ---
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
<!--/info-opts-->

View File

@ -8,27 +8,37 @@ links:
size: xs size: xs
--- ---
<!--init-cmd-->
```bash [Terminal] ```bash [Terminal]
npx nuxi init [--verbose|-v] [--template,-t] [dir] npx nuxi init [DIR] [--cwd=<directory>] [-t, --template] [-f, --force] [--offline] [--preferOffline] [--no-install] [--gitInit] [--shell] [--packageManager]
``` ```
<!--/init-cmd-->
The `init` command initializes a fresh Nuxt project using [unjs/giget](https://github.com/unjs/giget). The `init` command initializes a fresh Nuxt project using [unjs/giget](https://github.com/unjs/giget).
## Arguments
<!--init-args-->
Argument | Description
--- | ---
`DIR=""` | Project directory
<!--/init-args-->
## Options ## Options
Option | Default | Description <!--init-opts-->
-------------------------|-----------------|------------------ Option | Default | Description
`--cwd` | | Current working directory --- | --- | ---
`--log-level` | | Log level `--cwd=<directory>` | `.` | Specify the working directory
`--template, -t` | `v3` | Specify template name or git repository to use as a template. Format is `gh:org/name` to use a custom github template. `-t, --template` | | Template name
`--force, -f` | `false` | Force clone to any existing directory. `-f, --force` | | Override existing directory
`--offline` | `false` | Force offline mode (do not attempt to download template from GitHub and only use local cache). `--offline` | | Force offline mode
`--prefer-offline` | `false` | Prefer offline mode (try local cache first to download templates). `--preferOffline` | | Prefer offline mode
`--no-install` | `false` | Skip installing dependencies. `--no-install` | | Skip installing dependencies
`--git-init` | `false` | Initialize git repository. `--gitInit` | | Initialize git repository
`--shell` | `false` | Start shell after installation in project directory (experimental). `--shell` | | Start shell after installation in project directory
`--package-manager` | `npm` | Package manager choice (npm, pnpm, yarn, bun). `--packageManager` | | Package manager choice (npm, pnpm, yarn, bun)
`--dir` | | Project directory. <!--/init-opts-->
## Environment variables ## Environment variables

View File

@ -12,17 +12,31 @@ Nuxi provides a few utilities to work with [Nuxt modules](/modules) seamlessly.
## nuxi module add ## nuxi module add
<!--module-add-cmd-->
```bash [Terminal] ```bash [Terminal]
npx nuxi module add <NAME> npx nuxi module add <MODULENAME> [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--skipInstall] [--skipConfig]
``` ```
<!--/module-add-cmd-->
Option | Default | Description <!--module-add-args-->
-------------------------|-----------------|------------------ Argument | Description
`NAME` | - | The name of the module to install. --- | ---
`MODULENAME` | Module name
<!--/module-add-args-->
<!--module-add-opts-->
Option | Default | Description
--- | --- | ---
`--cwd=<directory>` | `.` | Specify the working directory
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
`--skipInstall` | | Skip npm install
`--skipConfig` | | Skip nuxt.config.ts update
<!--/module-add-opts-->
The command lets you install [Nuxt modules](/modules) in your application with no manual work. The command lets you install [Nuxt modules](/modules) in your application with no manual work.
When running the command, it will: When running the command, it will:
- install the module as a dependency using your package manager - install the module as a dependency using your package manager
- add it to your [package.json](/docs/guide/directory-structure/package) file - add it to your [package.json](/docs/guide/directory-structure/package) file
- update your [`nuxt.config`](/docs/guide/directory-structure/nuxt-config) file - update your [`nuxt.config`](/docs/guide/directory-structure/nuxt-config) file
@ -30,19 +44,35 @@ When running the command, it will:
**Example:** **Example:**
Installing the [`Pinia`](/modules/pinia) module Installing the [`Pinia`](/modules/pinia) module
```bash [Terminal] ```bash [Terminal]
npx nuxi module add pinia npx nuxi module add pinia
``` ```
## nuxi module search ## nuxi module search
<!--module-search-cmd-->
```bash [Terminal] ```bash [Terminal]
npx nuxi module search <QUERY> npx nuxi module search <QUERY> [--cwd=<directory>] [--nuxtVersion=<2|3>]
``` ```
<!--/module-search-cmd-->
Option | Default | Description ### Arguments
-------------------------|-----------------|------------------
`QUERY` | - | The name of the module to search for. <!--module-search-args-->
Argument | Description
--- | ---
`QUERY` | keywords to search for
<!--/module-search-args-->
### Options
<!--module-search-opts-->
Option | Default | Description
--- | --- | ---
`--cwd=<directory>` | `.` | Specify the working directory
`--nuxtVersion=<2\|3>` | | Filter by Nuxt version and list compatible modules only (auto detected by default)
<!--/module-search-opts-->
The command searches for Nuxt modules matching your query that are compatible with your Nuxt version. The command searches for Nuxt modules matching your query that are compatible with your Nuxt version.

View File

@ -8,12 +8,29 @@ links:
size: xs size: xs
--- ---
<!--prepare-cmd-->
```bash [Terminal] ```bash [Terminal]
npx nuxi prepare [--log-level] [rootDir] npx nuxi prepare [ROOTDIR] [--dotenv] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--envName]
``` ```
<!--/prepare-cmd-->
The `prepare` command creates a [`.nuxt`](/docs/guide/directory-structure/nuxt) directory in your application and generates types. This can be useful in a CI environment or as a `postinstall` command in your [`package.json`](/docs/guide/directory-structure/package). The `prepare` command creates a [`.nuxt`](/docs/guide/directory-structure/nuxt) directory in your application and generates types. This can be useful in a CI environment or as a `postinstall` command in your [`package.json`](/docs/guide/directory-structure/package).
Option | Default | Description ## Arguments
-------------------------|-----------------|------------------
`rootDir` | `.` | The root directory of the application to prepare. <!--prepare-args-->
Argument | Description
--- | ---
`ROOTDIR="."` | Specifies the working directory (default: `.`)
<!--/prepare-args-->
## Options
<!--prepare-opts-->
Option | Default | Description
--- | --- | ---
`--dotenv` | | Path to `.env` file to load, relative to the root directory
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
`--envName` | | The environment to use when resolving configuration overrides (default is `production` when building, and `development` when running the dev server)
<!--/prepare-opts-->

View File

@ -8,16 +8,32 @@ links:
size: xs size: xs
--- ---
<!--preview-cmd-->
```bash [Terminal] ```bash [Terminal]
npx nuxi preview|start [rootDir] [--dotenv] npx nuxi preview [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--envName] [--dotenv]
``` ```
<!--/preview-cmd-->
The `preview` command starts a server to preview your Nuxt application after running the `build` command. The `start` command is an alias for `preview`. When running your application in production refer to the [Deployment section](/docs/getting-started/deployment). The `preview` command starts a server to preview your Nuxt application after running the `build` command. The `start` command is an alias for `preview`. When running your application in production refer to the [Deployment section](/docs/getting-started/deployment).
Option | Default | Description ## Arguments
-------------------------|-----------------|------------------
`rootDir` | `.` | The root directory of the application to preview. <!--preview-args-->
`--dotenv` | `.` | Point to another `.env` file to load, **relative** to the root directory. Argument | Description
--- | ---
`ROOTDIR="."` | Specifies the working directory (default: `.`)
<!--/preview-args-->
## Options
<!--preview-opts-->
Option | Default | Description
--- | --- | ---
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
`--envName` | | The environment to use when resolving configuration overrides (default is `production` when building, and `development` when running the dev server)
`--dotenv` | | Path to `.env` file to load, relative to the root directory
<!--/preview-opts-->
This command sets `process.env.NODE_ENV` to `production`. To override, define `NODE_ENV` in a `.env` file or as command-line argument. This command sets `process.env.NODE_ENV` to `production`. To override, define `NODE_ENV` in a `.env` file or as command-line argument.

View File

@ -8,15 +8,30 @@ links:
size: xs size: xs
--- ---
<!--typecheck-cmd-->
```bash [Terminal] ```bash [Terminal]
npx nuxi typecheck [--log-level] [rootDir] npx nuxi typecheck [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>]
``` ```
<!--/typecheck-cmd-->
The `typecheck` command runs [`vue-tsc`](https://github.com/vuejs/language-tools/tree/master/packages/tsc) to check types throughout your app. The `typecheck` command runs [`vue-tsc`](https://github.com/vuejs/language-tools/tree/master/packages/tsc) to check types throughout your app.
Option | Default | Description ## Arguments
-------------------------|-----------------|------------------
`rootDir` | `.` | The directory of the target application. <!--typecheck-args-->
Argument | Description
--- | ---
`ROOTDIR="."` | Specifies the working directory (default: `.`)
<!--/typecheck-args-->
## Options
<!--typecheck-opts-->
Option | Default | Description
--- | --- | ---
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
<!--/typecheck-opts-->
::note ::note
This command sets `process.env.NODE_ENV` to `production`. To override, define `NODE_ENV` in a [`.env`](/docs/guide/directory-structure/env) file or as a command-line argument. This command sets `process.env.NODE_ENV` to `production`. To override, define `NODE_ENV` in a [`.env`](/docs/guide/directory-structure/env) file or as a command-line argument.

View File

@ -8,13 +8,29 @@ links:
size: xs size: xs
--- ---
<!--upgrade-cmd-->
```bash [Terminal] ```bash [Terminal]
npx nuxi upgrade [--force|-f] npx nuxi upgrade [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [-f, --force] [-ch, --channel=<stable|nightly>]
``` ```
<!--/upgrade-cmd-->
The `upgrade` command upgrades Nuxt to the latest version. The `upgrade` command upgrades Nuxt to the latest version.
Option | Default | Description ## Arguments
-------------------------|-----------------|------------------
`--force, -f` | `false` | Removes `node_modules` and lock files before upgrade. <!--upgrade-args-->
`--channel, -ch` | `"stable"` | Specify a channel to install from ("nightly" or "stable") Argument | Description
--- | ---
`ROOTDIR="."` | Specifies the working directory (default: `.`)
<!--/upgrade-args-->
## Options
<!--upgrade-opts-->
Option | Default | Description
--- | --- | ---
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
`-f, --force` | | Force upgrade to recreate lockfile and node_modules
`-ch, --channel=<stable\|nightly>` | `stable` | Specify a channel to install from (default: stable)
<!--/upgrade-opts-->