C.48 JsMinTask

The JsMinTask minifies JavaScript files using JShrink, which can be installed using composer (Phing will try to use the composer autoloader)

Table C.57: Attributes

targetDirStringPath where to store minified JavaScript filesnoneYes
suffixStringSuffix to append to the filenames.-minNo
failonerrorBooleanWhether an error while minifying a JavaScript file should stop the build or notfalseNo

C.48.1 Example

<jsMin targetDir="docroot/script/minified" failOnError="false">
  <fileset dir="docroot/script">
    <include name="**/*.js"/>

C.48.2 Supported Nested Tags

  • fileset

    JavaScript files to be minified.