From df8fba1df8907cf88e2e097394de80c4e8a0fbc9 Mon Sep 17 00:00:00 2001 From: Jeroen Heijmans Date: Sun, 28 Mar 2021 20:51:38 +0200 Subject: [PATCH] Use cross-OS way to delete build output Fixes #175 Thanks to @MicahZoltu see https://stackoverflow.com/a/54361341/419956 --- package-lock.json | 6 ++++++ package.json | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 5c5ec72..b4520a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3133,6 +3133,12 @@ "picomatch": "^2.2.1" } }, + "recursive-fs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/recursive-fs/-/recursive-fs-2.1.0.tgz", + "integrity": "sha512-oed3YruYsD52Mi16s/07eYblQOLi5dTtxpIJNdfCEJ7S5v8dDgVcycar0pRWf4IBuPMIkoctC8RTqGJzIKMNAQ==", + "dev": true + }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", diff --git a/package.json b/package.json index 06d611a..08bc903 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "compile": "node_modules/.bin/tsc", "prepare": "npm run-script --silent build-app", "format": "node_modules/.bin/clang-format -i -style=file --glob=src/**.ts", - "clean": "rm -rf built", + "clean": "node -e \"require('recursive-fs').rmdirr(require('path').resolve('built'), ()=>{})\"", "pretest": "npm run-script --silent compile", "test": "node_modules/.bin/karma start karma.conf --browsers=Chrome --single-run=false --debug", "pregzipSize": "npm run-script --silent minify", @@ -58,6 +58,7 @@ "karma-browserify": "^7.0.0", "karma-chrome-launcher": "^3.1.0", "karma-jasmine": "^4.0.1", + "recursive-fs": "^2.1.0", "typescript": "^4.0.2", "watchify": "^3.11.1" },