pickstack

SvelteKit + Built-in

Shared store using the framework's own reactivity (runes / signals); no package. This page shows exactly what pickstack adds to a SvelteKit project for Built-in: the packages, the new files and the changes to existing ones. Every combination is installed, built, linted and tested in CI.

$ npm create pickstack@latest my-app -- --framework sveltekit --modules builtin --yes
Customize in the configurator

New files

src/lib/counterStore.svelte.ts
export const counter = $state({ count: 0 });

export function increment() {
  counter.count += 1;
}

export function decrement() {
  counter.count -= 1;
}

Changes to existing files

src/lib/Counter.svelte (changed)
 <script lang="ts">+  import { counter, decrement, increment } from "./counterStore.svelte.js";−  let count = $state(0); </script>   <div class="card">+  <p class="count">{counter.count}</p>−  <p class="count">{count}</p>   <div class="row">+    <button type="button" class="btn" onclick={decrement}>-1</button>+    <button type="button" class="btn" onclick={increment}>+1</button>−    <button type="button" class="btn" onclick={() => count--}>-1</button>−    <button type="button" class="btn" onclick={() => count++}>+1</button>   </div> </div>  
src/routes/about/+page.svelte (changed)
 <section class="page">   <h1 class="title">About</h1>+  <p class="text">+    Built with SvelteKit, Svelte 5, TypeScript, Svelte runes store.+  </p>−  <p class="text">Built with SvelteKit, Svelte 5, TypeScript.</p> </section>  

Project files

Related templates