diff options
-rwxr-xr-x | contrib/no-useless-comments | 7 | ||||
-rw-r--r-- | package.json | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/contrib/no-useless-comments b/contrib/no-useless-comments new file mode 100755 index 0000000..235eae4 --- /dev/null +++ b/contrib/no-useless-comments @@ -0,0 +1,7 @@ +#!/bin/zsh +set -e +for f in ./build/**/*.html ./build/*.html; do + sed -i 's/<!--\[-->//g' "$f" + sed -i 's/<!--\]-->//g' "$f" + sed -i 's/<!---->//g' "$f" +done diff --git a/package.json b/package.json index 29e2d24..c0e8415 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "dev": "pnpm animgen && vite dev", - "build": "pnpm animgen && vite build", + "build": "pnpm animgen && vite build && contrib/no-useless-comments", "preview": "vite preview", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", @@ -36,4 +36,4 @@ "@memdmp/keyframegen": "https://npm.jsr.io/~/11/@jsr/memdmp__keyframegen/0.2.1.tgz", "openpgp": "^6.1.0" } -} +}
\ No newline at end of file |