Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/yaxingson/vue-ink


https://github.com/yaxingson/vue-ink

Last synced: 24 days ago
JSON representation

Awesome Lists containing this project

README

        

## Features

## Getting Started

### Install

```sh
> npm i vue-ink vue

```

### Usage

```js
import { defineComponent, ref, onMounted, onUnmounted, h } from 'vue'
import { createInkApp } from 'vue-ink'

const Counter = defineComponent({
setup() {
const count = ref(0)

let timer

onMounted(()=>timer = setInterval(()=>count.value+=1, 100))
onUnmounted(()=>clearInterval(timer))

return ()=>h(Text, `${count.value} tests passed`)
}
})

createInkApp(Counter).mount()

```

## Components

### `Text`

### `Box`

### `Newline`

### `Spacer`

### `Link`

## Composition API

### `useInput`

### `useApp`

### `useStdin`

### `useStdout`

### `useStderr`

## Demos