Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rihanarfan/partykit-nuxt

Use PartyKit πŸŽ‰ with Nuxt πŸ’š
https://github.com/rihanarfan/partykit-nuxt

nuxt partykit vue

Last synced: about 1 month ago
JSON representation

Use PartyKit πŸŽ‰ with Nuxt πŸ’š

Awesome Lists containing this project

README

        

# πŸŽ‰ partykit-nuxt

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]

Use PartyKit πŸŽ‰ with Nuxt πŸ’š

Vue port of PartySocket (PartyKit's Client API), powered by VueUse's [useWebSocket](https://vueuse.org/core/useWebSocket/).

- [✨  Release Notes](/CHANGELOG.md)

## Features

- ↔️ Β usePartySocket() - Vue PartySocket composable

## Roadmap

- Automatically start PartyKit server with Nuxt

## Quick Setup

Install the module to your Nuxt application with one command:

```bash
npx nuxi module add partykit-nuxt
```

That's it! You can now use partykit-nuxt in your Nuxt app ✨

## Documentation

### `usePartySocket()`

```ts
const { close, data, id, open, send, status, ws } = usePartySocket({
host: 'localhost:1999',
room: 'room',
immediate: false,
autoReconnect: true,
query: {
token: accessToken,
},
})
```

## Contribution

Local development

```bash
# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release
```

[npm-version-src]: https://img.shields.io/npm/v/partykit-nuxt/latest.svg?style=flat&colorA=020420&colorB=00DC82
[npm-version-href]: https://npmjs.com/package/partykit-nuxt

[npm-downloads-src]: https://img.shields.io/npm/dm/partykit-nuxt.svg?style=flat&colorA=020420&colorB=00DC82
[npm-downloads-href]: https://npmjs.com/package/partykit-nuxt

[license-src]: https://img.shields.io/npm/l/partykit-nuxt.svg?style=flat&colorA=020420&colorB=00DC82
[license-href]: https://npmjs.com/package/partykit-nuxt

[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
[nuxt-href]: https://nuxt.com