Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/symind/svelte-ink
- Owner: SyMind
- License: mit
- Created: 2023-01-17T15:59:37.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-24T00:44:59.000Z (almost 2 years ago)
- Last Synced: 2024-10-06T09:09:37.527Z (about 1 month ago)
- Language: TypeScript
- Size: 106 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 greenI 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)