Skip to content

Commit

Permalink
release 0.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
smastrom committed May 20, 2023
1 parent b9419f9 commit 12dedde
Show file tree
Hide file tree
Showing 7 changed files with 239 additions and 180 deletions.
4 changes: 1 addition & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
{
"files": "README.md",
"options": {
"semi": false,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false
"trailingComma": "none"
}
}
]
Expand Down
64 changes: 50 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div align="center">

<img src="https://i.ibb.co/DKmV9Xj/cover.png" style="border-radius: 10px;" />
![notivue](https://i.ibb.co/DKmV9Xj/cover.png)

### Fully-featured notification system for Vue 3.
### Fully-featured notification system for Vue and Nuxt.

[Live Demo](https://notivue.netlify.app) - [Documentation](https://notivuedocs.netlify.app) - [StackBlitz](https://stackblitz.com/edit/vitejs-vite-kdrtrw?file=src/components/Example.vue)
[Live Demo](https://notivue.netlify.app) - [Documentation](https://notivuedocs.netlify.app) - [Vite Example](https://stackblitz.com/edit/vitejs-vite-kdrtrw?file=src/components/Example.vue) - [Nuxt Example](https://stackblitz.com/edit/nuxt-starter-fnhcmx?file=app.vue)

</div>

Expand Down Expand Up @@ -47,22 +47,59 @@ _Pure CSS RTL support_
pnpm add notivue
```

### Vite / Vue CLI
<br />

## Vite / Vue CLI

### 1. Configure

**main.js**

```js
import { createApp } from 'vue'
import { notivue } from 'notivue'
import App from './App.vue'

import 'notivue/notifications.css'
import 'notivue/animations.css'

createApp(App).use(notivue).mount('#app')
```

### Nuxt 3
**App.vue**

```vue
<script setup>
import { Notivue, notifications } from 'notivue'
</script>
<template>
<Notivue :use="notifications" />
<!-- ... -->
</template>
```

### 2. Push notifications from any anywhere

```vue
<script setup>
import { usePush } from 'notivue'
const push = usePush()
</script>
<template>
<button @click="push.success('Something good has been pushed!')">Push</button>
</template>
```

<br />

## Nuxt 3

**plugins/notivue.ts**
### 1. Configure

**plugins/notivue.client.ts** (create _/plugins_ folder if it doesn't exist)

```ts
import { notivue } from 'notivue'
Expand All @@ -80,23 +117,22 @@ export default defineNuxtConfig({
})
```

<br />

## Usage

**App.vue**
**App.vue** (wrap `<Notivue />` in a [ClientOnly](https://nuxt.com/docs/api/components/client-only) component)

```vue
<script setup>
import { Notivue, notifications } from 'notivue'
</script>
<template>
<Notivue :use="notifications" />
<ClientOnly>
<Notivue :use="notifications" />
</ClientOnly>
<-- ... -->
</template>
```

**Anywhere in your app**
### 2. Push notifications from any anywhere

```vue
<script setup>
Expand All @@ -114,7 +150,7 @@ const push = usePush()

## Links

[Live Demo](https://notivue.netlify.app) - [Documentation](https://notivuedocs.netlify.app) - [StackBlitz](https://stackblitz.com/edit/vitejs-vite-kdrtrw?file=src/components/Example.vue)
[Live Demo](https://notivue.netlify.app) - [Documentation](https://notivuedocs.netlify.app) - [Vite Example](https://stackblitz.com/edit/vitejs-vite-kdrtrw?file=src/components/Example.vue) - [Nuxt Example](https://stackblitz.com/edit/nuxt-starter-fnhcmx?file=app.vue)

<br />

Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "notivue",
"version": "0.9.3",
"version": "0.9.4",
"private": false,
"description": "Fully-featured notification system for Vue 3.",
"description": "Fully-featured notification system for Vue and Nuxt.",
"keywords": [
"vue",
"vuejs",
Expand Down Expand Up @@ -56,26 +56,26 @@
"test:gui": "cypress open --component"
},
"devDependencies": {
"@rollup/plugin-terser": "^0.4.1",
"@types/node": "^18.16.9",
"@rollup/plugin-terser": "^0.4.3",
"@types/node": "^18.16.13",
"@vitejs/plugin-vue": "^4.2.3",
"axe-core": "^4.7.0",
"axe-core": "^4.7.1",
"cssnano": "^5.1.15",
"cypress": "^12.12.0",
"cypress-axe": "^1.4.0",
"cypress-real-events": "^1.7.6",
"cypress-real-events": "^1.8.1",
"husky": "^8.0.3",
"playwright-webkit": "^1.33.0",
"playwright-webkit": "^1.34.0",
"postcss": "^8.4.23",
"postcss-cli": "^10.1.0",
"postcss-nesting": "^11.2.2",
"prettier": "^2.8.8",
"pretty-quick": "^3.1.3",
"rimraf": "^4.4.1",
"typescript": "^4.9.5",
"vite": "^4.3.5",
"vite": "^4.3.8",
"vite-plugin-dts": "^2.3.0",
"vue": "^3.3.2",
"vue": "^3.3.4",
"vue-tsc": "^1.6.5"
}
}
Loading

0 comments on commit 12dedde

Please sign in to comment.