wip
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
<svelte:head>
|
||||
<link rel="icon" href={favicon} />
|
||||
<script src="/wasm_exec.js"></script>
|
||||
</svelte:head>
|
||||
|
||||
{@render children?.()}
|
||||
|
@@ -1,13 +1,11 @@
|
||||
<script lang="ts">
|
||||
import Header from '$lib/components/Header.svelte';
|
||||
import Playground from '$lib/components/Playground.svelte';
|
||||
import StatusBar from '$lib/components/StatusBar.svelte';
|
||||
</script>
|
||||
|
||||
<div class="bg-background text-foreground flex min-h-screen flex-col">
|
||||
<Header />
|
||||
<Playground />
|
||||
<StatusBar />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
@@ -1,47 +0,0 @@
|
||||
<script lang="ts">
|
||||
import {onMount} from 'svelte';
|
||||
|
||||
const test = `---
|
||||
_type: Recipe
|
||||
author.name: Max Richter
|
||||
---
|
||||
|
||||
# Baguette
|
||||
|
||||
My favourite baguette recipe
|
||||
|
||||
## Ingredients
|
||||
- Flour
|
||||
- Water
|
||||
- Salt
|
||||
|
||||
## Steps
|
||||
1. Mix Flour Water and Salt
|
||||
2. Bake the bread
|
||||
`
|
||||
|
||||
function exec(){
|
||||
let start = performance.now();
|
||||
const res = markaParseFile(test);
|
||||
let end = performance.now();
|
||||
|
||||
console.log(JSON.parse(res))
|
||||
|
||||
start = performance.now();
|
||||
const res2 = markaMatchBlocks(test);
|
||||
end = performance.now();
|
||||
|
||||
console.log(JSON.parse(res2))
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
const go = new Go();
|
||||
WebAssembly.instantiateStreaming(fetch("/main.wasm"), go.importObject).then((result) => {
|
||||
go.run(result.instance);
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<button onclick={exec}>test</button>
|
Reference in New Issue
Block a user