[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

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