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

https://github.com/rixo/svench

A lightweight workbench to develop your Svelte components in isolation
https://github.com/rixo/svench

Last synced: about 1 year ago
JSON representation

A lightweight workbench to develop your Svelte components in isolation

Awesome Lists containing this project

README

          

# Svench

> A lightweight workbench to develop your Svelte components in isolation.

---


WORK IN PROGRESS

---

## Status

This is very much a work in progress. Actually, it's still little more than a POC for now.

You're welcome to reach to me via Svelte's Discord channel or issue to contribute ideas (or more)!

Docs are currently being rewritten for v0.2. You can find previous docs in the [legacy README](https://github.com/rixo/svench/tree/v0.1#readme).

## v0.2

From scratch:

```bash
npm init -y
npm add -D svelte vite @sveltejs/vite-plugin-svelte svench
mkdir src
echo '# Hello' > src/hello.md
echo '

Hi!

' > src/Hi.svench
npx svench
```

```bash
pnpm init -y
pnpm add -D svelte vite @sveltejs/vite-plugin-svelte svench
mkdir src
echo '# Hello' > src/hello.md
echo '

Hi!

' > src/Hi.svench
pnpx svench
```

```bash
yarn init -y
yarn add -D svelte vite @sveltejs/vite-plugin-svelte svench
mkdir src
echo '# Hello' > src/hello.md
echo '

Hi!

' > src/Hi.svench
yarn svench
```

If you are using SvelteKit, add `disableDependencyReinclusion` into your `svelte.config.js` file to prevent `vite-plugin-svelte` from including
Node-only packages in Vite's prebundling step.

```diff
const config = {
+ disableDependencyReinclusion: ['svench'],
kit: {
...
}
}
```