Skip to content

Commit

Permalink
docs: revert installation process to current implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-solanki committed Dec 22, 2022
1 parent 584a717 commit 2b6b00a
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions docs/guide/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@

```bash
# pnpm
pnpm add anu-vue @anu-vue/preset-theme-default && pnpm add -D unocss @iconify-json/bx
pnpm add anu-vue @anu-vue/preset-theme-default && pnpm add -D unocss sass @iconify-json/bx

# yarn
yarn add anu-vue @anu-vue/preset-theme-default && yarn add -D unocss @iconify-json/bx
yarn add anu-vue @anu-vue/preset-theme-default && yarn add -D unocss sass @iconify-json/bx

# npm
npm install anu-vue @anu-vue/preset-theme-default && npm install -D unocss @iconify-json/bx
npm install anu-vue @anu-vue/preset-theme-default && npm install -D unocss sass @iconify-json/bx
```

:::info
As of v0.11.0, we need to install `sass` as dev dependency. This will be no longer needed in upcoming version.
:::

## Usage

1. Add UnoCSS to `vite.config.js`
Expand Down Expand Up @@ -72,11 +76,11 @@
import 'anu-vue/dist/style.css'
// default theme styles
import '@anu-vue/preset-theme-default/dist/style.css'
import '@anu-vue/preset-theme-default/dist/styles.scss'
// Using `app.use(anu)` will register all the components globally
createApp(App)
.use(anu)
.use(anu, { registerComponents: true })
.mount('#app')
```

Expand Down Expand Up @@ -108,7 +112,7 @@ You can also follow À la carte fashion if you don't want to register all the co
- import { anu } from 'anu-vue'

createApp(App)
- .use(anu)
- .use(anu, { registerComponents: true })
.mount('#app')
```

Expand All @@ -134,7 +138,7 @@ You can also follow À la carte fashion if you don't want to register all the co
- import { anu } from 'anu-vue'

createApp(App)
- .use(anu)
- .use(anu, { registerComponents: true })
.mount('#app')
```

Expand Down Expand Up @@ -186,16 +190,20 @@ You can also follow À la carte fashion if you don't want to register all the co

```bash
# pnpm
pnpm add @anu-vue/nuxt
pnpm add @anu-vue/nuxt && pnpm add -D sass

# yarn
yarn add @anu-vue/nuxt
yarn add @anu-vue/nuxt && yarn add -D sass

# npm
npm install @anu-vue/nuxt
npm install @anu-vue/nuxt && npm install -D sass
```

2. Add Anu & UnoCSS in nuxt modules
:::info
As of v0.11.0, we need to install `sass` as dev dependency. This will be no longer needed in upcoming version.
:::

1. Add Anu & UnoCSS in nuxt modules

```ts
import { defineNuxtConfig } from 'nuxt/config'
Expand All @@ -205,8 +213,8 @@ You can also follow À la carte fashion if you don't want to register all the co
})
```

3. Add UnoCSS config file `uno.config.js` as shown in step 2 of [usage](#usage) section.
4. Using [Preset](/guide/features/presets.md),
2. Add UnoCSS config file `uno.config.js` as shown in step 2 of [usage](#usage) section.
3. Using [Preset](/guide/features/presets.md),
1. If you are going to use `preset-theme-default`, first install it.

```bash
Expand All @@ -227,7 +235,7 @@ You can also follow À la carte fashion if you don't want to register all the co

export default defineNuxtConfig({
modules: ['@anu-vue/nuxt', '@unocss/nuxt'],
+ css: ['@anu-vue/preset-theme-default/dist/style.css'],
+ css: ['@anu-vue/preset-theme-default/dist/styles.scss'],
})
```

Expand Down

0 comments on commit 2b6b00a

Please sign in to comment.