Skip to content

Commit b05097f

Browse files
Run build script with npx (#17)
Ref: apollographql/typescript-repo-template#83
1 parent 32274c7 commit b05097f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"node": ">=14.0"
1919
},
2020
"scripts": {
21-
"build": "tsc --build tsconfig.build.json",
21+
"//": "#use npx here to ensure that non-TS users triggering the postinstall script don't need to install TypeScript globally or in their project",
22+
"build": "npx -p typescript tsc --build tsconfig.build.json",
2223
"clean": "git clean -dfqX",
2324
"install-with-npm-8.5": "npm i -g npm@^8.5.0 && npm i",
2425
"postinstall": "npm run build",

0 commit comments

Comments
 (0)