mix combo.static.digest (combo v0.5.0)

View Source

Digests and compresses static files.

$ mix combo.static.digest
$ mix combo.static.digest priv/static -o /www/public

The first argument is the path where the static files are located. The -o option specifies the path that will be used to save the digested and compressed files.

If no path is given, it will use priv/static as the input and output path.

By default, it will include following files:

  • the original file
  • the file compressed with gzip
  • a file whose name contains the original file name and its digest
  • a compressed file whose name contains the file name and its digest
  • a manifest file

An example of files:

  • app.js
  • app.js.gz
  • app-eb0a5b9302e8d32828d8a73f137cc8f0.js
  • app-eb0a5b9302e8d32828d8a73f137cc8f0.js.gz
  • manifest.digest.json

You can use mix combo.static.clean to prune stale versions of the static files. If you want to remove all generated files:

$ mix combo.static.clean --all

vsn

To disable generating the query string "?vsn=d" in the references of static files, use the option --no-vsn.

Options

  • -o, --output - specifies the path of output directory. Defaults to priv/static.

  • --no-vsn - do not add version query string to file references.

  • --no-compile - do not run mix compile.