C.43 JsMinTask

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

Table C.52: 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.43.1 Example

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

C.43.2 Supported Nested Tags

  • fileset

    JavaScript files to be minified.