Skip to content

rixo/svench

Repository files navigation

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.

v0.2

From scratch:

npm init -y
npm add -D svelte vite @sveltejs/vite-plugin-svelte svench
mkdir src
echo '# Hello' > src/hello.md
echo '<h1>Hi!</h1>' > src/Hi.svench
npx svench
pnpm init -y
pnpm add -D svelte vite @sveltejs/vite-plugin-svelte svench
mkdir src
echo '# Hello' > src/hello.md
echo '<h1>Hi!</h1>' > src/Hi.svench
pnpx svench
yarn init -y
yarn add -D svelte vite @sveltejs/vite-plugin-svelte svench
mkdir src
echo '# Hello' > src/hello.md
echo '<h1>Hi!</h1>' > 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.

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