Created
September 16, 2018 02:23
-
-
Save Rich-Harris/110572d0b426b535886b2a3995c218e0 to your computer and use it in GitHub Desktop.
10 second Svelte demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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