Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 620 Bytes

README.md

File metadata and controls

33 lines (24 loc) · 620 Bytes

ClojureScript preprocessor for Svelte using Squint

Counter.svelte

<script lang="cljs">
  (def counter 0)

  (defn increment []
    (set! counter (inc counter)))
</script>

<button on:click={increment}>
  count is {counter}
</button>

Install

npm install -D svelte-preprocess-cljs

add to svelte.config.js

import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
import { cljsPreprocess } from "svelte-preprocess-squint";

export default {
  preprocess: [cljsPreprocess(), vitePreprocess()],
};