Skip to content

Commit 3db823a

Browse files
Add TypeScript type checking to example build scripts
Add `tsc --noEmit &&` before `vite build` in all example `package.json` files to catch type errors during builds. Previously, type errors in `server.ts` files were not detected because Vite/Bun transpile without type checking. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent deedddc commit 3db823a

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
lines changed

examples/basic-host/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "1.0.0",
55
"type": "module",
66
"scripts": {
7-
"build": "concurrently \"cross-env INPUT=index.html vite build\" \"cross-env INPUT=sandbox.html vite build\"",
7+
"build": "tsc --noEmit && concurrently \"cross-env INPUT=index.html vite build\" \"cross-env INPUT=sandbox.html vite build\"",
88
"watch": "concurrently \"cross-env INPUT=index.html vite build --watch\" \"cross-env INPUT=sandbox.html vite build --watch\"",
99
"serve": "bun serve.ts",
1010
"start": "cross-env NODE_ENV=development npm run build && npm run serve",

examples/basic-server-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"build": "cross-env INPUT=mcp-app.html vite build",
7+
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
88
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
99
"serve": "bun server.ts",
1010
"start": "cross-env NODE_ENV=development npm run build && npm run serve",

examples/basic-server-vanillajs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"build": "cross-env INPUT=mcp-app.html vite build",
7+
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
88
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
99
"serve": "bun server.ts",
1010
"start": "cross-env NODE_ENV=development npm run build && npm run serve",

examples/budget-allocator-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"build": "cross-env INPUT=mcp-app.html vite build",
7+
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
88
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
99
"serve:http": "bun server.ts",
1010
"serve:stdio": "bun server.ts --stdio",

examples/cohort-heatmap-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"build": "cross-env INPUT=mcp-app.html vite build",
7+
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
88
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
99
"serve:http": "bun server.ts",
1010
"serve:stdio": "bun server.ts --stdio",

examples/customer-segmentation-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"build": "cross-env INPUT=mcp-app.html vite build",
7+
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
88
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
99
"serve:http": "bun server.ts",
1010
"serve:stdio": "bun server.ts --stdio",

examples/scenario-modeler-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"build": "cross-env INPUT=mcp-app.html vite build",
7+
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
88
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
99
"serve:http": "bun server.ts",
1010
"serve:stdio": "bun server.ts --stdio",

examples/system-monitor-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"build": "cross-env INPUT=mcp-app.html vite build",
7+
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
88
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
99
"serve:http": "bun server.ts",
1010
"serve:stdio": "bun server.ts --stdio",

examples/threejs-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"build": "cross-env INPUT=mcp-app.html vite build",
7+
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
88
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
99
"serve:http": "bun server.ts",
1010
"serve:stdio": "bun server.ts --stdio",

examples/wiki-explorer-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"build": "cross-env INPUT=mcp-app.html vite build",
7+
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
88
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
99
"serve:http": "bun server.ts",
1010
"serve:stdio": "bun server.ts --stdio",

0 commit comments

Comments
 (0)