Skip to content

Do not hardcode the path of the minify binary

Achilleas Pipinellis requested to merge minify-assets-run-locally into master

The minify-assets.sh script is used to minify HTML, CSS, JSON, and SVG. Currently, it can only be run in the context of the pipeline, since it uses a path for the minify script, specific to the Docker image we build.

This MR changes that by:

  • Putting the minify binary in a location that's in the PATH, so that it can be invoked from anywhere with just its name.
  • Changing the minify-assets.sh script to check if minify is present in the PATH. That way, if you have it installed in your machine, you should be able to run the script locally.

TL;DR: Do not hardcode the path of the minify binary.

Edited by Achilleas Pipinellis

Merge request reports