Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/symind/svelte-ink

🌈 Svelte for interactive command-line apps
https://github.com/symind/svelte-ink

Last synced: 26 days ago
JSON representation

🌈 Svelte for interactive command-line apps

Awesome Lists containing this project

README

        

Svelte Ink

Svelte for CLIs. Build and test your CLI output using components.

# Install

Use create-svelte-ink-app to quickly scaffold a new Ink-based CLI.

```bash
npx create-svelte-ink-app
```

# Usage

```svelte

import { onDestroy } from 'svelte'

let counter = 0

const timer = setInterval(() => {
counter += 1
}, 100)

onDestroy(() => clearInterval(timer))

{counter} tests passed
```

# Components

## ``

This component can display text, and change its style to make it bold, underline, italic or strikethrough.

```svelte
I am green

I am black on white

I am white
I am bold
I am italic
I am underline
I am strikethrough
I am inversed
```

Note: allows only text nodes and nested components inside of it. For example, component can't be used inside .

# License

[MIT](../../LICENSE)