summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-12 09:11:30 +0100
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-12 09:11:30 +0100
commit3cd73da4e13f64ef3740821d1d8604389e9735ee (patch)
tree9705520aa950b9c67745aa3d327cd1348dea05b9
parent2d722a4a12e41dcafb89065dde6809ffc2137cf3 (diff)
Cleans cleanly on pre-commit
-rw-r--r--.husky/pre-commit7
1 files changed, 6 insertions, 1 deletions
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