Skip to content

Commit 6a13414

Browse files
committed
Use esbuild to create the playground
1 parent 8188cad commit 6a13414

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/playground/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010
],
1111
"scripts": {
1212
"bootstrap": "node scripts/getListOfPluginsFromNPM.js",
13+
"build-fast": "esbuild src/index.ts --outdir=../typescriptlang-org/static/js/playground/2 --format=esm --target=es2020 --bundle",
1314
"build": "tsc",
1415
"test": "jest"
1516
},
1617
"dependencies": {
17-
"@typescript/sandbox": "0.1.0"
18+
"@typescript/sandbox": "0.1.0",
19+
"esbuild": "^0.13.4"
1820
},
1921
"devDependencies": {
2022
"@types/jest": "^25.1.3",

packages/playground/src/index.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ interface PlaygroundConfig {
7070
supportCustomPlugins: boolean
7171
}
7272

73-
export const setupPlayground = (
73+
const setupPlayground = (
7474
sandbox: Sandbox,
7575
monaco: Monaco,
7676
config: PlaygroundConfig,
@@ -445,7 +445,7 @@ export const setupPlayground = (
445445
sidebarTabs.style.display = "none"
446446
sidebarContent.style.display = "none"
447447
settingsContent.style.display = "block"
448-
;(document.querySelector(".playground-sidebar label") as any).focus()
448+
; (document.querySelector(".playground-sidebar label") as any).focus()
449449
}
450450
settingsToggle.parentElement!.classList.toggle("open")
451451
}
@@ -668,3 +668,5 @@ const redirectTabPressTo = (element: HTMLElement, container: HTMLElement | undef
668668
}
669669
})
670670
}
671+
672+
window.setupPlayground = setupPlayground

0 commit comments

Comments
 (0)