diff --git a/package-lock.json b/package-lock.json index 7170fdb..a635578 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "esbuild": "^0.19.11", "eslint": "^8.56.0", "mocha": "^10.2.0", + "run-script-os": "^1.1.6", "typescript": "^5.3.3" }, "engines": { @@ -2184,6 +2185,16 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/run-script-os": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/run-script-os/-/run-script-os-1.1.6.tgz", + "integrity": "sha512-ql6P2LzhBTTDfzKts+Qo4H94VUKpxKDFz6QxxwaUZN0mwvi7L3lpOI7BqPCq7lgDh3XLl0dpeXwfcVIitlrYrw==", + "dev": true, + "bin": { + "run-os": "index.js", + "run-script-os": "index.js" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", diff --git a/package.json b/package.json index 066509a..c0a0f7e 100644 --- a/package.json +++ b/package.json @@ -113,7 +113,9 @@ "esbuild-watch": "npm run esbuild-base -- --sourcemap --watch", "esbuild": "npm run esbuild-base -- --sourcemap", "lint": "eslint ./client/src --ext .ts,.tsx", - "make-readonly": "echo \"Making /slice readonly for distribution\" && chmod -R a-w ./slice", + "make-readonly": "echo \"Making /slice readonly for distribution\" && run-script-os", + "make-readonly:nix": "chmod -R a-w ./slice", + "make-readonly:win32": "attrib +r /s /d /l .\\slice\\*", "postinstall": "cd client && npm install", "test-compile": "tsc -p ./", "vscode:prepublish": "npm run make-readonly && npm run esbuild-base -- --minify", @@ -127,6 +129,7 @@ "esbuild": "^0.19.11", "eslint": "^8.56.0", "mocha": "^10.2.0", + "run-script-os": "^1.1.6", "typescript": "^5.3.3" } }