JavaScript::Squish provides methods to compact Javascript source down to only what is needed. It can remove all comments, put everything on one line (semi-)safely, and remove extra whitespace. It breaks the process down into individual steps, and one can pick and choose what parts to complete to get a custom amount of compactness. It is distributed as a Perl module and a handy bin script (so you don't need to know Perl to use it, but you can do a lot more custom things if you do).
| Tags | Software Development Libraries Perl Modules Text Processing Filters |
|---|---|
| Licenses | GPL Artistic |
| Operating Systems | OS Independent |
| Implementation | Perl JavaScript |
Recent releases


Release Notes: Bare regular expressions are now properly treated as strings, and their contents are not squished. Statements not terminated by a semi-colon were handled wrongly when join_all() was called.


Release Notes: The command line utility has been updated to support all the options the library supports, which should make this much more user friendly to casual users.


Release Notes: If some comments were excluded from removal and all lines were squished to one line, the JavaScript would come back twice (as if you did "var data = code + code;"). This bug has been fixed.


No changes have been submitted for this release.