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
3 changes: 3 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
- name: Build library for browser
run: bun build ./src/index.ts --outdir ./playground/dist --target browser --minify

- name: Bundle TypeScript compiler for offline playground
run: cp node_modules/typescript/lib/typescript.js ./playground/dist/typescript.js

- name: Setup Pages
uses: actions/configure-pages@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"files": {
"ignoreUnknown": false,
"ignore": ["dist/**", "node_modules/**", "*.d.ts", "playground/**/*.js"]
"ignore": ["dist/**", "node_modules/**", "*.d.ts", "playground/**/*.js", "playground/serve.ts"]
},
"formatter": {
"enabled": true,
Expand Down
4 changes: 3 additions & 1 deletion docs/playground.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ compiler from CDN and transpiles user code to JavaScript before execution.
Users can write type annotations, interfaces, and generics — the compiler
strips them automatically.

- TypeScript compiler: loaded from `https://cdn.jsdelivr.net/npm/typescript@5/lib/typescript.js`
- TypeScript compiler: bundled locally (`playground/dist/typescript.js`) with
CDN fallback (`https://cdn.jsdelivr.net/npm/typescript@5/lib/typescript.js`).
- No WASM required — the compiler runs natively in JavaScript.

### 3. Live tsb Library Access
Expand Down Expand Up @@ -112,6 +113,7 @@ playground/

```bash
bun build ./src/index.ts --outdir ./playground/dist --target browser --minify
cp node_modules/typescript/lib/typescript.js ./playground/dist/typescript.js
```

The CI pipeline (`pages.yml`) runs this automatically during deployment.
Expand Down
Loading
Loading