Minify JS
Component ID
2845450
Component name
Minify JS
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
6896
Component created
Component changed
Component body
Minify JS was developed to replace the implementation of the Minify module which has a couple of problems:
- Problem: It is not storing the minified versions of it's files in the public file system properly. This in turn will not allow other modules, such as the S3 File System module, to work with it.
Solution: This module uses the public file system exclusively and any module that uses it's own Stream Wrapper for the public file system will work with this module out of the box. - Problem: The minification process is using a remote call to Closure Compiler which has a few limitations, specifically a limitation on the number of files it can minify in an hour and another preventing it from minifying the JS to a single line.
Solution: This module uses the JSqueeze PHP class for it's minification which does not have these limitations. - Problem: The module only detected javascript files that were loaded on a page, which means that all pages would need to be visited to get a complete list of javascript files.
Solution: This module scans the file directory for .js files (excluding .min.js files).
The companion module Minify Source HTML module minifies page source HTML.
