Closed morningtoast closed 2 years ago
Here's my sed configs in RPIV
#Remove leading and trailing whitespace
sed -i 's/^[ \t]*//;s/[ \t]*$//' ${RAW}
#Remove all comments
sed -i 's:--.*$::g' ${RAW}
#Delete empty lines
sed -i '/^$/d' ${RAW}
Warning: This only handles single line comments, and will screw up multiline comments.
Implemented in 09f9ed3eb72485783260ee4bed24a99682e294cc. luamin
now has a --keep-all-names
command line flag.
Have a flag that will only strip out comments and that's it. Leave everything else the way it is.
Removing comments is an easy way to get some compression headroom. I'm very generous with my comments and hate having to remove many of them as I'll forget everything when I go back to work on things much later in the future.
(Using luamin with my game still results in odd in-game behavior. Can't really isolate it yet but when I do, I'll put in another ticket.)