Skip to content

Commit

Permalink
docs: use new nuxi module add command
Browse files Browse the repository at this point in the history
  • Loading branch information
wattanx committed Apr 8, 2024
1 parent 354ce06 commit 25dd998
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,16 @@ This module allows the `store` directory to be used in Nuxt 3, reducing the diff

## Quick Setup

1. Add `@wattanx/nuxt-vuex` dependency to your project
You can install `@wattanx/nuxt-vuex` using `nuxi`:

```bash
# Using pnpm
pnpm add -D @wattanx/nuxt-vuex

# Using yarn
yarn add --dev @wattanx/nuxt-vuex

# Using npm
npm install --save-dev @wattanx/nuxt-vuex
```

2. Add `@wattanx/nuxt-vuex` to the `modules` section of `nuxt.config.ts`

```js
export default defineNuxtConfig({
modules: ['@wattanx/nuxt-vuex'],
});
npx nuxi@latest module add @wattanx/nuxt-vuex
```

That's it! You can now use `@wattanx/nuxt-vuex` in your Nuxt app ✨

## Usage

See Nuxt 2 docs for basic usage.
https://v2.nuxt.com/docs/directory-structure/store/

Expand All @@ -66,7 +52,7 @@ export default defineNuxtPlugin(() => {
if (process.server) {
$store.dispatch('server/increment');
}
})
});
```

## Development
Expand Down

0 comments on commit 25dd998

Please sign in to comment.