/svu

Svelte development, supercharged.

Primary LanguageTypeScriptMIT LicenseMIT

/svu

Svelte development, supercharged.

svu started out as a collection of svelte-related utilities I copied from project to project. svu is currently in alpha, while the API settles. If you run into any issues, or have any questions or suggestions, feel free to open an issue on GitHub.

Features

Check out the various parts of the docs:

Getting Started

  1. Install from npm:
npm i -D svu
  1. For SvelteKit: add this to your vite.config.js:

This tells Vite to treat this package as part of our application code. We need this because for some SvelteKit /svu's are using SvelteKit utilities like the $app syntax.

optimizeDeps: {
    exclude: ['svu', 'svu/*'],
},
ssr: {
    noExternal: ['svu', 'svu/*'],
},
  1. Import only what you need.

For SvelteKit:

<script>
	import { draggable } from 'svu/action';
</script>

<p use:draggable>Be Happy</p>

For Svelte:

<script>
	import { draggable } from 'svu/svelte/action';
</script>

<p use:draggable>Be Happy</p>

Find out wether you need one of our actions, custom stores, app-related stores, client-related stores and components.

  1. Be happy!

Status

The API is in flux and may change without warning in 0.X.0 updates.