From 3cd73da4e13f64ef3740821d1d8604389e9735ee Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Sat, 12 Aug 2023 09:11:30 +0100 Subject: Cleans cleanly on pre-commit --- .husky/pre-commit | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to '.husky') diff --git a/.husky/pre-commit b/.husky/pre-commit index 76f511e..9e83e3d 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,9 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npx lint-staged && rm -rdf api && cd api-src && npx tsc && git add ../api +npx lint-staged \ + && cd api \ + && fd "(.js|.js.map)$" | xargs rm \ + && cd ../api-src \ + && npx tsc \ + && git add ../api -- cgit v1.2.3