Open lynxionxs opened 11 months ago
I made a bash script to minify hyperscript code. Not ideal, but i don't have a better solution
#!/bin/bash
filename="$1"
output="hs-min.hs"
line=""
add_space=0
while read -r code_line; do
if [[ $code_line != \--* ]]; then
if [ $add_space -eq 1 ]; then
line="$line "
add_space=0
fi
line="$line$code_line"
add_space=1
fi
done <"$filename"
if [ $add_space -eq 1 ]; then
line="$line "
fi
echo -n "$line" >"$output"
Can Hyperscript code in .hs files be minified ?