From 3c9b1eac3c0a1338f3c05d48fadb6aef8e2f7a9d Mon Sep 17 00:00:00 2001 From: Vizonex Date: Thu, 6 Nov 2025 12:34:51 -0600 Subject: [PATCH 1/4] add an all plaform supported cleanup solution --- bin/clean.ts | 12 ++++++++++++ package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 bin/clean.ts diff --git a/bin/clean.ts b/bin/clean.ts new file mode 100644 index 0000000..413d35a --- /dev/null +++ b/bin/clean.ts @@ -0,0 +1,12 @@ +#!/usr/bin/env -S node --import tsx + +import { rmSync } from "fs"; +/* +Some operating systems do not have the ability to perform +rm -rf ... (example: Windows) +*/ + +rmSync('lib', {'force':true, 'recursive':true}) +rmSync('test/tmp', {'force':true, 'recursive':true}) + + diff --git a/package.json b/package.json index 829d074..84fe8ed 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "prebuild-wasm": "npm run wasm -- --prebuild && npm run wasm -- --setup", "build-wasm": "npm run wasm -- --docker", "wasm": "node --import tsx bin/build_wasm.ts", - "clean": "rm -rf lib && rm -rf test/tmp", + "clean": "node --import tsx bin/clean.ts", "prepare": "npm run clean && npm run build-ts", "test": "node --import tsx ./test/md-test.ts", "lint": "eslint", From 7d2fd910ec06b36ce6813355ab5d46a2a498aba6 Mon Sep 17 00:00:00 2001 From: Vizonex Date: Tue, 24 Feb 2026 12:46:22 -0600 Subject: [PATCH 2/4] ensure clean.ts adheres to linting rules --- bin/clean.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/clean.ts b/bin/clean.ts index 413d35a..d1763fe 100644 --- a/bin/clean.ts +++ b/bin/clean.ts @@ -1,12 +1,11 @@ #!/usr/bin/env -S node --import tsx import { rmSync } from "fs"; -/* + +/* Some operating systems do not have the ability to perform -rm -rf ... (example: Windows) +rm -rf ... (example: Windows) */ rmSync('lib', {'force':true, 'recursive':true}) rmSync('test/tmp', {'force':true, 'recursive':true}) - - From 0a2dc8c0188486ad4d11752de85c3e3b99394580 Mon Sep 17 00:00:00 2001 From: Vizonex Date: Wed, 25 Feb 2026 13:30:10 -0600 Subject: [PATCH 3/4] make new scripts folder and ensure tsconfig and package.json know how to reach it --- package.json | 2 +- {bin => scripts}/clean.ts | 0 tsconfig.test.json | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename {bin => scripts}/clean.ts (100%) diff --git a/package.json b/package.json index 84fe8ed..48d604d 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "prebuild-wasm": "npm run wasm -- --prebuild && npm run wasm -- --setup", "build-wasm": "npm run wasm -- --docker", "wasm": "node --import tsx bin/build_wasm.ts", - "clean": "node --import tsx bin/clean.ts", + "clean": "node --import tsx scripts/clean.ts", "prepare": "npm run clean && npm run build-ts", "test": "node --import tsx ./test/md-test.ts", "lint": "eslint", diff --git a/bin/clean.ts b/scripts/clean.ts similarity index 100% rename from bin/clean.ts rename to scripts/clean.ts diff --git a/tsconfig.test.json b/tsconfig.test.json index 1328441..6fff347 100644 --- a/tsconfig.test.json +++ b/tsconfig.test.json @@ -4,5 +4,5 @@ "allowJs": true, "checkJs": true }, - "include": ["bench/**/*.ts", "bin/**/*.ts", "src/**/*.ts", "test/**/*.ts", "eslint.config.mjs"], + "include": ["bench/**/*.ts", "bin/**/*.ts", "src/**/*.ts", "test/**/*.ts", "scripts/**/*.ts","eslint.config.mjs"], } From dbf59b172dc1067d0457e0f330162c7324bcf3ab Mon Sep 17 00:00:00 2001 From: Vizonex Date: Wed, 25 Feb 2026 13:35:11 -0600 Subject: [PATCH 4/4] ensure eslint can find the scripts folder --- eslint.config.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/eslint.config.mjs b/eslint.config.mjs index 8348e3a..a53ec38 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -15,6 +15,7 @@ export default tseslint.config( "bin/**/*.ts", "bench/**/*.ts", "src/**/*.ts", + "scripts/**/*.ts", "test/**/*.ts", "eslint.config.js", ],