Readme

VS Code running from val.town !

Yep you can run it from the vscode extension.

2844a1869371362842589e509b36aea1d8c3bd4bbefe3eee08742ee0eb62d965.png

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/** @jsxImportSource https://esm.sh/hono@3.11.8/jsx **/
import { Hono } from "npm:hono@3.11.8";
const script = `Object.keys(self.webPackagePaths).map(function (key, index) {
self.webPackagePaths[
key
] = \`https://cdn.jsdelivr.net/npm/vscode-web@1.82.0/dist/node_modules/\${key}/\${self.webPackagePaths[key]}\`;
});
require.config({
baseUrl: \`https://cdn.jsdelivr.net/npm/vscode-web@1.82.0/dist/out\`,
recordStats: true,
trustedTypesPolicy: window.trustedTypes?.createPolicy('amdLoader', {
createScriptURL(value) {
return value;
},
}),
paths: self.webPackagePaths,
});`;
const Home = () => (
<html>
<head>
<meta charset="utf-8" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="Code" />
<link rel="icon" href="https://fav.farm/🔥" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"
/>
<link
data-name="vs/workbench/workbench.web.main"
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/vscode-web@1.82.0/dist/out/vs/workbench/workbench.web.main.css"
/>
</head>
<body aria-label=""></body>
<script src="https://cdn.jsdelivr.net/npm/vscode-web@1.82.0/dist/out/vs/loader.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vscode-web@1.82.0/dist/out/vs/webPackagePaths.js"></script>
<script dangerouslySetInnerHTML={{ __html: script }}>
</script>
<script src="https://cdn.jsdelivr.net/npm/vscode-web@1.82.0/dist/out/vs/workbench/workbench.web.main.nls.js">
</script>
<script src="https://cdn.jsdelivr.net/npm/vscode-web@1.82.0/dist/out/vs/workbench/workbench.web.main.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vscode-web@1.82.0/dist/out/vs/code/browser/workbench/workbench.js">
</script>
</html>
);
const app = new Hono();
app.get("/", c => c.html(<Home />));
app.get("/product.json", c =>
c.json(
{
"productConfiguration": {
"nameShort": "Val Town VS Code",
"nameLong": "Val Town VS Code",
"applicationName": "code-web-sample",
"dataFolderName": ".vscode-web-sample",
"version": "1.75.0",
"extensionsGallery": {
"serviceUrl": "https://open-vsx.org/vscode/gallery",
"itemUrl": "https://open-vsx.org/vscode/item",
"resourceUrlTemplate":
"https://openvsxorg.blob.core.windows.net/resources/{publisher}/{name}/{version}/{path}",
},
"extensionEnabledApiProposals": {
"vscode.vscode-web-playground": [
"fileSearchProvider",
"textSearchProvider",
],
},
},
},
));
export default app.fetch;
👆 This is a val. Vals are TypeScript snippets of code, written in the browser and run on our servers. Create scheduled functions, email yourself, and persist small pieces of data — all from the browser.