mix phx.digest (Phoenix v1.6.6) View Source
Digests and compresses static files.
$ mix phx.digest $ mix phx.digest priv/static -o /www/public
The first argument is the path where the static files are located. The
-o option indicates the path that will be used to save the digested and
If no path is given, it will use
priv/static as the input and output path.
The output folder will contain:
- the original file
- the file compressed with gzip
- a file containing the original file name and its digest
- a compressed file containing the file name and its digest
- a cache manifest file
Example of generated files:
You can use
mix phx.digest.clean to prune stale versions of the assets.
If you want to remove all produced files, run
mix phx.digest.clean --all.
It is possible to digest the stylesheet asset references without the query
string "?vsn=d" with the option