Skip to content

yaxingson/vue-ink

Repository files navigation

Features

Getting Started

Install

> npm i vue-ink vue

Usage

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

About

Vue for interactive command-line apps

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages