From 4d59feb91f6473d10abf24500a725bd797b1ee72 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 22 Dec 2018 18:48:42 -0500 Subject: [PATCH] show compiled CSS separately --- .../routes/repl/_components/Output/index.html | 16 +++++++++++----- site/src/routes/repl/_components/Repl.html | 11 +++++++---- site/static/workers/compiler.js | 4 ++-- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/site/src/routes/repl/_components/Output/index.html b/site/src/routes/repl/_components/Output/index.html index 80bd6c777d..928de99a7f 100644 --- a/site/src/routes/repl/_components/Output/index.html +++ b/site/src/routes/repl/_components/Output/index.html @@ -5,7 +5,8 @@ import CodeMirror from '../CodeMirror.html'; export let bundle - export let code; + export let js; + export let css; export let dom; export let ssr; export let props; @@ -97,9 +98,14 @@ >Result + class:active="{view === 'js'}" + on:click="{() => view = 'js'}" + >JS output + + @@ -157,7 +163,7 @@
{ - code = event.data.code; + js = event.data.js; + css = event.data.css; if (event.data.props) props = event.data.props; }; @@ -111,7 +113,7 @@ entry: component === $component_store[0] }); } else { - code = component.source; + js = css = `/* Select a component to see its compiled code */`; } } @@ -264,7 +266,8 @@