[Scripts > Strip] Add removal of blank lines, add comments

This commit is contained in:
Ducko 2022-02-06 17:50:08 +00:00
parent fe37f46bde
commit 1929cb0427
1 changed files with 2 additions and 1 deletions

View File

@ -1,3 +1,4 @@
#!/bin/sh
find src -type f -name "*.js" -exec sed -i -E 's@[[:blank:]]*([^:]//).*@@;T;/./!d' {} +
find src -type f -name "*.js" -exec sed -i -E 's@[[:blank:]]*([^:]//).*@@;T;/./!d' {} + # Remove // comments (ignore URLs)
find src -type f -name "*.js" -exec sed -i '/^[[:space:]]*$/d' {} + # Remove whitespace