Skip to content

Commit

Permalink
docs: update installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-solanki committed Dec 26, 2022
1 parent 27ec07b commit 3024501
Showing 1 changed file with 14 additions and 22 deletions.
36 changes: 14 additions & 22 deletions docs/guide/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@

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

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

# npm
npm install anu-vue @anu-vue/preset-theme-default && npm install -D unocss sass @iconify-json/bx
npm install anu-vue @anu-vue/preset-theme-default && npm install -D unocss @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 @@ -76,11 +72,11 @@ As of v0.11.0, we need to install `sass` as dev dependency. This will be no long
import 'anu-vue/dist/style.css'
// default theme styles
import '@anu-vue/preset-theme-default/dist/styles.scss'
import '@anu-vue/preset-theme-default/dist/style.css'
// Using `app.use(anu)` will register all the components globally
createApp(App)
.use(anu, { registerComponents: true })
.use(anu)
.mount('#app')
```

Expand Down Expand Up @@ -112,7 +108,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, { registerComponents: true })
- .use(anu)
.mount('#app')
```

Expand All @@ -138,7 +134,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, { registerComponents: true })
- .use(anu)
.mount('#app')
```

Expand Down Expand Up @@ -190,20 +186,16 @@ 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 -D sass
pnpm add @anu-vue/nuxt

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

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

:::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
2. Add Anu & UnoCSS in nuxt modules

```ts
import { defineNuxtConfig } from 'nuxt/config'
Expand All @@ -213,8 +205,8 @@ As of v0.11.0, we need to install `sass` as dev dependency. This will be no long
})
```

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

```bash
Expand All @@ -235,7 +227,7 @@ As of v0.11.0, we need to install `sass` as dev dependency. This will be no long

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

Expand Down

0 comments on commit 3024501

Please sign in to comment.