do not display compiler options in embedded REPL

pull/1913/head
Conduitry 6 years ago
parent 7aa612f61d
commit 7e3615c3d5

@ -5,7 +5,7 @@
import PropEditor from './PropEditor.html'; import PropEditor from './PropEditor.html';
import CodeMirror from '../CodeMirror.html'; import CodeMirror from '../CodeMirror.html';
export let bundle export let bundle;
export let js; export let js;
export let css; export let css;
export let dom; export let dom;
@ -17,6 +17,7 @@
export let sourceErrorLoc; export let sourceErrorLoc;
export let runtimeError; export let runtimeError;
export let compileOptions; export let compileOptions;
export let embedded;
// refs // refs
let viewer; let viewer;
@ -166,6 +167,14 @@
{/if} {/if}
</section> </section>
</SplitPane> </SplitPane>
{:elseif embedded}
<CodeMirror
mode="javascript"
code="{view === 'js' ? js : css}"
error={sourceError}
errorLoc={sourceErrorLoc}
readonly
/>
{:else} {:else}
<SplitPane type="vertical" pos={67}> <SplitPane type="vertical" pos={67}>
<div slot="a"> <div slot="a">

@ -10,6 +10,7 @@
export let version = 'alpha'; // TODO change this to latest when the time comes export let version = 'alpha'; // TODO change this to latest when the time comes
export let app; export let app;
export let embedded = false;
export function toJSON() { export function toJSON() {
// TODO there's a bug here — Svelte hoists this function because // TODO there's a bug here — Svelte hoists this function because
@ -310,6 +311,7 @@
{values_store} {values_store}
{sourceError} {sourceError}
{runtimeError} {runtimeError}
{embedded}
/> />
</section> </section>
</SplitPane> </SplitPane>

@ -103,6 +103,6 @@
<div class="repl-outer"> <div class="repl-outer">
{#if process.browser} {#if process.browser}
<Repl {version} {app}/> <Repl {version} {app} embedded={true}/>
{/if} {/if}
</div> </div>

Loading…
Cancel
Save