Skip to content

Instantly share code, notes, and snippets.

@Rich-Harris
Created September 16, 2018 02:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rich-Harris/110572d0b426b535886b2a3995c218e0 to your computer and use it in GitHub Desktop.
Save Rich-Harris/110572d0b426b535886b2a3995c218e0 to your computer and use it in GitHub Desktop.
10 second Svelte demo
echo "<button on:click='set({ count: count + 1 })'>{count}</button>" > App.html
npx svelte compile App.html --format iife --name App > App.js
echo "<div id=target></div>
<script src=App.js></script>
<script>
new App({
target,
data: { count: 0 }
});
</script>" > index.html
open index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment