After attempting some kind of automated code/display view I just went with hand placing a component in each file which only took 20 minutes. It took me one week to figure out the automated way, and it ended up being slow and clunky.
parent
ca0a708076
commit
2e863b922e
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -0,0 +1,24 @@ |
||||
<script> |
||||
import { onMount } from 'svelte'; |
||||
export let source = ""; |
||||
let code = ""; |
||||
|
||||
onMount(() => { |
||||
fetch(source) |
||||
.then(resource => resource.text()) |
||||
.then(data => code = data); |
||||
}); |
||||
</script> |
||||
|
||||
|
||||
<style> |
||||
|
||||
</style> |
||||
|
||||
|
||||
<pre> |
||||
<code> |
||||
{code} |
||||
</code> |
||||
</pre> |
||||
|
Loading…
Reference in new issue