Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 36 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
},
"homepage": "https://github.com/sveltejs/svelte#README",
"devDependencies": {
"@sveltejs/svelte-repl": "0.0.5",
"@types/mocha": "^5.2.0",
"@types/node": "^10.5.5",
"acorn": "^6.1.1",
Expand Down
1 change: 1 addition & 0 deletions site/src/routes/repl/_components/AppControls/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ export default app;` });
font-size: 1.6rem;
opacity: 0.7;
outline: none;
flex: 1;
}

input:focus {
Expand Down
11 changes: 10 additions & 1 deletion site/src/routes/repl/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@
`https://unpkg.com/svelte@${version}`;

const rollupUrl = `https://unpkg.com/rollup@1/dist/rollup.browser.js`;

// needed for context API example
const mapbox_setup = `window.MAPBOX_ACCESS_TOKEN = process.env.MAPBOX_ACCESS_TOKEN;`;
</script>

<style>
Expand Down Expand Up @@ -171,6 +174,12 @@
/>

{#if process.browser}
<Repl bind:this={repl} {svelteUrl} {rollupUrl} {relaxed}/>
<Repl
bind:this={repl}
{svelteUrl}
{rollupUrl}
{relaxed}
setup={mapbox_setup}
/>
{/if}
</div>
13 changes: 12 additions & 1 deletion site/src/routes/tutorial/[slug]/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@

const svelteUrl = `https://unpkg.com/svelte@beta`;
const rollupUrl = `https://unpkg.com/rollup@1/dist/rollup.browser.js`;

// needed for context API tutorial
const mapbox_setup = `window.MAPBOX_ACCESS_TOKEN = process.env.MAPBOX_ACCESS_TOKEN;`;
</script>

<style>
Expand Down Expand Up @@ -242,6 +245,14 @@
</div>

<div class="tutorial-repl">
<Repl bind:this={repl} {svelteUrl} {rollupUrl} orientation="rows" on:change={handle_change} relaxed/>
<Repl
bind:this={repl}
{svelteUrl}
{rollupUrl}
orientation="rows"
on:change={handle_change}
setup={mapbox_setup}
relaxed
/>
</div>
</div>