mix francis.digest (Francis v0.2.0)
View SourceDigests and compresses static files for production deployment.
This task generates versions of static files with content-based hashes in their filenames and creates a manifest file mapping original names to their hashed versions.
$ mix francis.digest
$ mix francis.digest priv/static
$ mix francis.digest priv/static --output priv/static
Command line options
--output- the output path for generated files. Defaults to the input path.--age- sets the cache control max age in seconds for static assets. This value is used for cache headers. Defaults to 31536000 (1 year).--gzip- when set to false, does not generate gzipped files. Defaults to true.--exclude- list of file patterns to exclude from digest. Example:--exclude '*.txt' --exclude '*.json'
The output will be a set of digested files along with a cache manifest file. The manifest file maps original file names to their digested counterparts.
Examples
$ mix francis.digest
Generated digested assets in priv/static:
* app.css -> app-a1b2c3d4e5f6.css
* app.js -> app-9f8e7d6c5b4a.js
* manifest.json
$ mix francis.digest assets --output priv/static
Generated digested assets from assets to priv/static
Summary
Functions
Callback implementation for Mix.Task.run/1.
Functions
Callback implementation for Mix.Task.run/1.