From ada12595d9460284ad330933b71ab81a522fc77f Mon Sep 17 00:00:00 2001 From: Herb Caudill Date: Thu, 9 Nov 2023 17:18:03 +0100 Subject: [PATCH] make create-repo-node-app build work cross-platform (#229) --- packages/create-repo-node-app/package.json | 3 ++- packages/create-repo-node-app/postbuild.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 packages/create-repo-node-app/postbuild.js diff --git a/packages/create-repo-node-app/package.json b/packages/create-repo-node-app/package.json index 2de16f09e..4ee24940f 100644 --- a/packages/create-repo-node-app/package.json +++ b/packages/create-repo-node-app/package.json @@ -8,7 +8,8 @@ "type": "module", "bin": "dist/index.js", "scripts": { - "build": "tsc && chmod a+x dist/index.js", + "build": "tsc", + "postbuild": "node postbuild.js", "watch": "npm-watch build" }, "publishConfig": { diff --git a/packages/create-repo-node-app/postbuild.js b/packages/create-repo-node-app/postbuild.js new file mode 100644 index 000000000..6dd6d72a0 --- /dev/null +++ b/packages/create-repo-node-app/postbuild.js @@ -0,0 +1,3 @@ +import fs from "fs" + +fs.chmodSync("dist/index.js", "755")