Skip to content

Commit

Permalink
docs: use new nuxi module add command in installation (#2896)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Apr 3, 2024
1 parent 62dfff5 commit c5a55a3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 69 deletions.
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,7 @@ If you would like to use the stable version for Nuxt 2, please see the [`v7` bra
1. Add the following line to the `devDependencies` with your package manager:

```sh
# Using npm
npm install @nuxtjs/i18n --save-dev

# Using yarn
yarn add --dev @nuxtjs/i18n

# Using pnpm
pnpm add -D @nuxtjs/i18n
npx nuxi@latest module add i18n
```

2. Add `@nuxtjs/i18n` to the `modules` section of `nuxt.config.ts`
Expand Down
21 changes: 2 additions & 19 deletions docs/content/docs/1.getting-started/1.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,10 @@ Nuxt i18n module is using **Vue i18n v9**. See [Vue i18n docs](https://vue-i18n.
## Quick Start

1. Install `@nuxtjs/i18n` as a dev dependency to your project:

::code-group

```bash [pnpm]
pnpm add -D @nuxtjs/i18n
```

```bash [yarn]
yarn add -D @nuxtjs/i18n
```

```bash [npm]
npm install -D @nuxtjs/i18n
```

```bash [bun]
bun add -D @nuxtjs/i18n
```bash
npx nuxi@latest module add i18n
```

::

2. Add `@nuxtjs/i18n` to your `nuxt.config` modules:

```ts [nuxt.config.ts]
Expand Down
13 changes: 2 additions & 11 deletions docs/content/docs/5.v7/1.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,10 @@ Check the [Nuxt.js documentation](https://nuxtjs.org/guides/configuration-glossa
::

Add `@nuxtjs/i18n` dependency to your project:

::code-group

```bash [Yarn]
yarn add @nuxtjs/i18n@7x
```

```bash [npm]
npm install @nuxtjs/i18n@7x
```bash
npx nuxi@latest module add i18n
```

::

Then, add `@nuxtjs/i18n` to the `modules` section in your `nuxt.config.js`. You can use either of the following ways to specify the module options:

```ts {}[nuxt.config.ts]
Expand Down
15 changes: 2 additions & 13 deletions docs/content/docs/5.v7/17.migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,10 @@ Summary:
### The name of the module changed from `nuxt-i18n` to `@nuxtjs/i18n`

Uninstall the old module and install the new one:

::code-group

```bash [Yarn]
yarn remove nuxt-i18n
yarn add @nuxtjs/i18n
```bash
npx nuxi@latest module add i18n
```

```bash [NPM]
npm uninstall nuxt-i18n
npm install @nuxtjs/i18n
```

::

Change the module name in `nuxt.config.js`:

```diff
Expand Down
20 changes: 2 additions & 18 deletions docs/content/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,10 @@ hero:
to: https://github.com/nuxt-modules/i18n
target: _blank
code: |
::code-group
```bash [pnpm]
pnpm add -D @nuxtjs/i18n
```
```bash [yarn]
yarn add -D @nuxtjs/i18n
```
```bash [npm]
npm install -D @nuxtjs/i18n
```
```bash [bun]
bun add -D @nuxtjs/i18n
```bash
npx nuxi@latest module add i18n
```
::
features:
title: 'Build i18n-ready apps in seconds!'

Expand Down

1 comment on commit c5a55a3

@maggie44
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the description text should also have been changed

Add the following line to the `devDependencies` with your package manager:

npx nuxi@latest module add i18n also doesn't add it as a dev dependencies, but as a a normal dependency. Is that right?

Please sign in to comment.