Skip to content

Commit 78b319e

Browse files
Merge pull request modelcontextprotocol#421 from jonathanhefner/use-double-quotes-in-npm-scripts
Use escaped double quotes in npm scripts for Windows compatibility
2 parents 398f5b4 + 27196b3 commit 78b319e

File tree

23 files changed

+26
-23
lines changed

23 files changed

+26
-23
lines changed

docs/quickstart.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,12 @@ Configure your [`package.json`](https://github.com/modelcontextprotocol/ext-apps
4444
```bash
4545
npm pkg set type=module
4646
npm pkg set scripts.build="tsc --noEmit && tsc -p tsconfig.server.json && cross-env INPUT=mcp-app.html vite build"
47-
npm pkg set scripts.start="concurrently 'cross-env NODE_ENV=development INPUT=mcp-app.html vite build --watch' 'tsx watch main.ts'"
47+
npm pkg set scripts.start='concurrently "cross-env NODE_ENV=development INPUT=mcp-app.html vite build --watch" "tsx watch main.ts"'
4848
```
4949

50+
> [!NOTE]
51+
> Windows `cmd.exe` users will need to convert quotes in the above command: `npm pkg set scripts.start="concurrently ""cross-env NODE_ENV=development INPUT=mcp-app.html vite build --watch"" ""tsx watch main.ts"""`.
52+
5053
<details>
5154
<summary>Create <a href="https://github.com/modelcontextprotocol/ext-apps/blob/main/examples/quickstart/tsconfig.json"><code>tsconfig.json</code></a>:</summary>
5255

examples/basic-server-preact/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
1919
"serve": "bun --watch main.ts",
2020
"start": "cross-env NODE_ENV=development npm run build && npm run serve",
21-
"dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'",
21+
"dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"",
2222
"prepublishOnly": "npm run build"
2323
},
2424
"dependencies": {

examples/basic-server-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
2929
"serve": "bun --watch main.ts",
3030
"start": "cross-env NODE_ENV=development npm run build && npm run serve",
31-
"dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'",
31+
"dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"",
3232
"prepublishOnly": "npm run build"
3333
},
3434
"dependencies": {

examples/basic-server-solid/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
1919
"serve": "bun --watch main.ts",
2020
"start": "cross-env NODE_ENV=development npm run build && npm run serve",
21-
"dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'",
21+
"dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"",
2222
"prepublishOnly": "npm run build"
2323
},
2424
"dependencies": {

examples/basic-server-svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
1919
"serve": "bun --watch main.ts",
2020
"start": "cross-env NODE_ENV=development npm run build && npm run serve",
21-
"dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'",
21+
"dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"",
2222
"prepublishOnly": "npm run build"
2323
},
2424
"dependencies": {

examples/basic-server-vanillajs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
1919
"serve": "bun --watch main.ts",
2020
"start": "cross-env NODE_ENV=development npm run build && npm run serve",
21-
"dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'",
21+
"dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"",
2222
"prepublishOnly": "npm run build"
2323
},
2424
"dependencies": {

examples/basic-server-vue/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
1919
"serve": "bun --watch main.ts",
2020
"start": "cross-env NODE_ENV=development npm run build && npm run serve",
21-
"dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'",
21+
"dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"",
2222
"prepublishOnly": "npm run build"
2323
},
2424
"dependencies": {

examples/budget-allocator-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"start": "npm run start:http",
2222
"start:http": "cross-env NODE_ENV=development npm run build && npm run serve:http",
2323
"start:stdio": "cross-env NODE_ENV=development npm run build && npm run serve:stdio",
24-
"dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve:http'",
24+
"dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve:http\"",
2525
"prepublishOnly": "npm run build",
2626
"serve": "bun --watch main.ts"
2727
},

examples/cohort-heatmap-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"start": "npm run start:http",
2222
"start:http": "cross-env NODE_ENV=development npm run build && npm run serve:http",
2323
"start:stdio": "cross-env NODE_ENV=development npm run build && npm run serve:stdio",
24-
"dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve:http'",
24+
"dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve:http\"",
2525
"prepublishOnly": "npm run build",
2626
"serve": "bun --watch main.ts"
2727
},

examples/customer-segmentation-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"start": "npm run start:http",
2222
"start:http": "cross-env NODE_ENV=development npm run build && npm run serve:http",
2323
"start:stdio": "cross-env NODE_ENV=development npm run build && npm run serve:stdio",
24-
"dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve:http'",
24+
"dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve:http\"",
2525
"prepublishOnly": "npm run build",
2626
"serve": "bun --watch main.ts"
2727
},

0 commit comments

Comments
 (0)