C.33 JsMinTask
Prev | Appendix C. Optional tasks | Next

## C.33 JsMinTask

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

Table C.39: Attributes

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`targetDir` | `String` | Path where to store minified JavaScript files | none | Yes
`suffix` | `String` | Suffix to append to the filenames. | -min | No
`failonerror` | `Boolean` | Whether an error while minifying a JavaScript file should stop the build or not | `false` | No

### C.33.1 Example

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

### C.33.2 Supported Nested Tags

- `fileset`

  JavaScript files to be minified.

Prev | Up | Next
C.32 JslLintTask | Home | C.34 LiquibaseTask