Skip to content

Commit 9954c0a

Browse files
authored
rename REPL to Playground (#99)
1 parent 1e6faf9 commit 9954c0a

File tree

21 files changed

+35
-28
lines changed

21 files changed

+35
-28
lines changed

apps/svelte.dev/src/routes/(authed)/apps/+page.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
<ul class:selecting>
103103
{#each data.gists as gist}
104104
<li class:selected={selected.includes(gist.id)}>
105-
<a href={selecting ? undefined : `/repl/${gist.id}`}>
105+
<a href={selecting ? undefined : `/playground/${gist.id}`}>
106106
<h2>{gist.name}</h2>
107107
<span>updated {format(gist.updated_at || gist.created_at)}</span>
108108
</a>
@@ -130,7 +130,7 @@
130130
{/if}
131131
</div>
132132
{:else}
133-
<p>No apps here. <a href="/repl">Go make one!</a></p>
133+
<p>No apps here. <a href="/playground">Go make one!</a></p>
134134
{/if}
135135
{:else}
136136
<p>

apps/svelte.dev/src/routes/(authed)/repl/+page.js renamed to apps/svelte.dev/src/routes/(authed)/playground/+page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ export function load({ url }) {
1717
const q = new URLSearchParams();
1818
if (version) q.set('version', version);
1919
if (vim) q.set('vim', vim);
20-
redirect(301, `/repl/${id}?${q}`);
20+
redirect(301, `/playground/${id}?${q}`);
2121
}

apps/svelte.dev/src/routes/(authed)/repl/[id]/+page.server.js renamed to apps/svelte.dev/src/routes/(authed)/playground/[id]/+page.server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { error } from '@sveltejs/kit';
22

33
export async function load({ fetch, params, url }) {
4-
const res = await fetch(`/repl/api/${params.id}.json`);
4+
const res = await fetch(`/playground/api/${params.id}.json`);
55

66
if (!res.ok) {
77
error(/** @type {import('@sveltejs/kit').NumericRange<400, 599>} */ (res.status));

apps/svelte.dev/src/routes/(authed)/repl/[id]/+page.svelte renamed to apps/svelte.dev/src/routes/(authed)/playground/[id]/+page.svelte

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
}
2424
2525
const url =
26-
params.length > 0 ? `/repl/${data.gist.id}?${params.join('&')}` : `/repl/${data.gist.id}`;
26+
params.length > 0
27+
? `/playground/${data.gist.id}?${params.join('&')}`
28+
: `/playground/${data.gist.id}`;
2729
2830
history.replaceState({}, 'x', url);
2931
});
@@ -47,7 +49,7 @@
4749
4850
function handle_fork(event: CustomEvent) {
4951
console.log('> handle_fork', event);
50-
goto(`/repl/${event.detail.gist.id}?version=${version}`);
52+
goto(`/playground/${event.detail.gist.id}?version=${version}`);
5153
}
5254
5355
function handle_change(event: CustomEvent) {
@@ -56,17 +58,17 @@
5658
5759
const svelteUrl = $derived(
5860
browser && version === 'local'
59-
? `${location.origin}/repl/local`
61+
? `${location.origin}/playground/local`
6062
: `https://unpkg.com/svelte@${version}`
6163
);
6264
6365
const relaxed = $derived(data.gist.relaxed || (data.user && data.user.id === data.gist.owner));
6466
</script>
6567

6668
<svelte:head>
67-
<title>{name} • REPL • Svelte</title>
69+
<title>{name} • Playground • Svelte</title>
6870

69-
<meta name="twitter:title" content="{data.gist.name}REPL • Svelte" />
71+
<meta name="twitter:title" content="{data.gist.name}Playground • Svelte" />
7072
<meta name="twitter:description" content="Web development, but fun" />
7173
<meta name="Description" content="Interactive Svelte playground" />
7274
</svelte:head>

apps/svelte.dev/src/routes/(authed)/repl/[id]/AppControls.svelte renamed to apps/svelte.dev/src/routes/(authed)/playground/[id]/AppControls.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
const { files } = repl.toJSON() as { files: File[] };
5757
5858
try {
59-
const r = await fetch(`/repl/create.json`, {
59+
const r = await fetch(`/playground/create.json`, {
6060
method: 'POST',
6161
credentials: 'include',
6262
headers: {
@@ -121,7 +121,7 @@
121121
// ~> Any missing files are considered deleted!
122122
const { files } = repl.toJSON() as { files: File[] };
123123
124-
const r = await fetch(`/repl/save/${gist.id}.json`, {
124+
const r = await fetch(`/playground/save/${gist.id}.json`, {
125125
method: 'PUT',
126126
credentials: 'include',
127127
headers: {

apps/svelte.dev/src/routes/(authed)/repl/[id]/embed/+page.server.ts renamed to apps/svelte.dev/src/routes/(authed)/playground/[id]/embed/+page.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { error } from '@sveltejs/kit';
22

33
export async function load({ fetch, params, url }) {
4-
const res = await fetch(`/repl/api/${params.id}.json`);
4+
const res = await fetch(`/playground/api/${params.id}.json`);
55

66
if (!res.ok) {
77
throw error(res.status);

0 commit comments

Comments
 (0)