site: update REPL from svelte@beta to svelte@3

pull/2451/head
Conduitry 6 years ago
parent c2362f504a
commit b7b6a0958f

@ -4,7 +4,7 @@
import Repl from '@sveltejs/svelte-repl'; import Repl from '@sveltejs/svelte-repl';
import InputOutputToggle from './InputOutputToggle.svelte'; import InputOutputToggle from './InputOutputToggle.svelte';
export let version = 'beta'; export let version = '3';
export let gist = null; export let gist = null;
export let example = null; export let example = null;
export let embedded = false; export let embedded = false;

@ -11,7 +11,7 @@
<script> <script>
import ReplWidget from '../../components/Repl/ReplWidget.svelte'; import ReplWidget from '../../components/Repl/ReplWidget.svelte';
export let version = 'beta'; export let version = '3';
export let gist; export let gist;
export let example; export let example;
</script> </script>

@ -1,7 +1,7 @@
<script context="module"> <script context="module">
export function preload({ query }) { export function preload({ query }) {
return { return {
version: query.version || 'beta', version: query.version || '3',
gist_id: query.gist, gist_id: query.gist,
example: query.example || 'hello-world' example: query.example || 'hello-world'
}; };
@ -43,7 +43,7 @@
onMount(() => { onMount(() => {
if (version !== 'local') { if (version !== 'local') {
fetch(`https://unpkg.com/svelte@${version || 'beta'}/package.json`) fetch(`https://unpkg.com/svelte@${version || '3'}/package.json`)
.then(r => r.json()) .then(r => r.json())
.then(pkg => { .then(pkg => {
version = pkg.version; version = pkg.version;

@ -101,7 +101,7 @@
}); });
} }
const svelteUrl = `https://unpkg.com/svelte@beta`; const svelteUrl = `https://unpkg.com/svelte@3`;
const rollupUrl = `https://unpkg.com/rollup@1/dist/rollup.browser.js`; const rollupUrl = `https://unpkg.com/rollup@1/dist/rollup.browser.js`;
// needed for context API tutorial // needed for context API tutorial

Loading…
Cancel
Save