From 322f0451d8102a6749431b11b5d4c289c4ecb06c Mon Sep 17 00:00:00 2001 From: Tan Li Hau Date: Thu, 9 Apr 2020 15:24:39 +0800 Subject: [PATCH] feat: mark entry file for repl --- site/src/components/Repl/ReplWidget.svelte | 3 +++ site/src/routes/repl/[id]/index.svelte | 3 +++ 2 files changed, 6 insertions(+) diff --git a/site/src/components/Repl/ReplWidget.svelte b/site/src/components/Repl/ReplWidget.svelte index 9d06fb7868..0eb0cc8335 100644 --- a/site/src/components/Repl/ReplWidget.svelte +++ b/site/src/components/Repl/ReplWidget.svelte @@ -56,6 +56,9 @@ return a.name < b.name ? -1 : 1; }); + // mark entry file + components.find(component => component.name === 'App').is_entry = true; + repl.set({ components }); }); } else if (example) { diff --git a/site/src/routes/repl/[id]/index.svelte b/site/src/routes/repl/[id]/index.svelte index b237e19967..351f6e29ad 100644 --- a/site/src/routes/repl/[id]/index.svelte +++ b/site/src/routes/repl/[id]/index.svelte @@ -74,6 +74,9 @@ return a.name < b.name ? -1 : 1; }); + // mark entry file + components.find(component => component.name === 'App').is_entry = true; + repl.set({ components }); }); } else {