- Removes Comments - both
/* ... */style comments.
- Removes White spaces - newlines, spaces and tabs.
- Replaces all variable names with a shorter version(a,b,...,z,aa,ab,...).
perl compressor.pl <JS File> [options]
perl compressor.pl settings.js -display -verbose -change-name
Command Line Options
-verbose - Show details of what is going on.
-readable - Use \\n instead of ';' as the command separator.
-change-name - Rename the variables to a shorter version. Enabled by default.
-remove-vars - Remove the 'var' keyword - this is asking for trouble.
-print - Outputs the compressed data instead of writing it to a file.
- BUG: Changes the text if the variable name appears in the comments/strings/other places.
- The variables appearing more times must have shorter number of chars.
- Change the variables that don't use the 'var' declaration method. - Is this possible?
- Implement Un-removeable comments - needed for copyright statements.
- Change the names of the functions/classes too?