mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
docs: add documentation for nuxi module
(#24790)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Julien Huang <julien.h.dev@gmail.com> Co-authored-by: Sébastien Chopin <seb@nuxtlabs.com> Co-authored-by: Damian Głowala <damian.glowala.rebkow@gmail.com>
This commit is contained in:
parent
6d50b4744b
commit
800902df12
53
docs/3.api/4.commands/module.md
Normal file
53
docs/3.api/4.commands/module.md
Normal file
@ -0,0 +1,53 @@
|
||||
---
|
||||
title: "nuxi module"
|
||||
description: "Search and add modules to your Nuxt application with the command line."
|
||||
links:
|
||||
- label: Source
|
||||
icon: i-simple-icons-github
|
||||
to: https://github.com/nuxt/cli/blob/main/src/commands/module/
|
||||
size: xs
|
||||
---
|
||||
|
||||
Nuxi provides a few utilities to work with [Nuxt modules](/modules) seamlessly.
|
||||
|
||||
## nuxi module add
|
||||
|
||||
```bash [Terminal]
|
||||
npx nuxi module add <NAME>
|
||||
```
|
||||
|
||||
Option | Default | Description
|
||||
-------------------------|-----------------|------------------
|
||||
`NAME` | - | The name of the module to install.
|
||||
|
||||
The command lets you install [Nuxt modules](/modules) in your application with no manual work.
|
||||
|
||||
When running the command, it will:
|
||||
- install the module as a dependency using your package manager
|
||||
- add it to your [package.json](/docs/guide/directory-structure/package) file
|
||||
- update your [`nuxt.config`](/docs/guide/directory-structure/nuxt-config) file
|
||||
|
||||
**Example:**
|
||||
|
||||
Installing the [`Pinia`](/modules/pinia) module
|
||||
```bash [Terminal]
|
||||
npx nuxi module add pinia
|
||||
```
|
||||
|
||||
## nuxi module search
|
||||
|
||||
```bash [Terminal]
|
||||
npx nuxi module search <QUERY>
|
||||
```
|
||||
|
||||
Option | Default | Description
|
||||
-------------------------|-----------------|------------------
|
||||
`QUERY` | - | The name of the module to search for.
|
||||
|
||||
The command searches for Nuxt modules matching your query that are compatible with your Nuxt version.
|
||||
|
||||
**Example:**
|
||||
|
||||
```base [Terminal]
|
||||
npx nuxi module search pinia
|
||||
```
|
Loading…
Reference in New Issue
Block a user