Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yaxingson/vue-ink
https://github.com/yaxingson/vue-ink
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/yaxingson/vue-ink
- Owner: yaxingson
- License: mit
- Created: 2024-04-30T12:34:02.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-07-03T04:01:54.000Z (7 months ago)
- Last Synced: 2024-12-27T06:49:08.439Z (about 1 month ago)
- Language: TypeScript
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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