A Grunt.js task that compiles CSS and JS files with respect of file modification date. For JS, it uses built-in UglifyJS minifier, for CSS — Yandex’s CSSO with automatic
@import inlining and
Unlike basic minifiers, this task generates a hidden catalog file (
.build-catalog.json) that stores state, last compilation date and checksum of minified files. Every time you call
frontend-* task, it will look into this catalog and check if the state of files being minified was changed. If not, the file will not be re-minified which saves CPU time and modification date. This date (or checksum hash) can be used to modify URLs to minified files for effective caching.
This plugin provides
frontend-index multi-tasks. Global config can be defined in
frontend key. All tasks are file-based. Here’s example