svu
v0.3.12
Published
Svelte development, supercharged.
Downloads
40
Readme
/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:
/action
: A huge collection of svelte:actions./app
: App related utilities./client
: Client related stores and utils./components
: Useful components./store
: Custom stores./transition
: Custom transition functions.
Getting Started
- Install from npm:
npm i -D svu
- 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/*'],
},
- 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.
Status
The API is in flux and may change without warning in 0.X.0 updates.