# tasks/ext/jsmin/JsMinTask.php

## \JsMinTask
jump to top

Package: phing\tasks\ext

Task to minify javascript files.

Requires JSMin which can be found at http://code.google.com/p/jsmin-php/ but is bundled with Phing so no additional install of JsMin is required.

Parent(s)
  \Task < \ProjectComponent
Author
  Frank Kleine
Since
  2.3.0
Version
  $Id: JsMinTask.php 1231 2011-07-25 20:11:53Z mrook $

### Properties

`boolean $failonerror= 'false'`

Whether the build should fail, if errors occured

Default value `false` Details

Type
  boolean

`\FileSet $filesets= 'array()'`

the source files

Default value `array()`Details

Type
  \FileSet

`boolean $suffix= ''-min''`

Define if the target should use or not a suffix -min

Default value`'-min'`Details

Type
  boolean

`string $targetDir= ''`

directory to put minified javascript files into

Details

Type
  string

### Methods

`createFileSet( ) : void`

Nested creator, adds a set of files (nested fileset attribute).

`getDescription( ) : void`

`getLocation( ) : void`

`getOwningTarget( ) : void`

`getProject( ) : void`

`getRegisterSlot( ) : void`

`getRuntimeConfigurableWrapper( ) : void`

`getTaskName( ) : void`

`getTaskType( ) : void`

`init( ) : void`

The init method: Do init steps.

`log( ) : void`

`main( ) : void`

The main entry point method.

`maybeConfigure( ) : void`

`perform( ) : void`

`setDescription( ) : void`

`setFailonerror( boolean $value ) : void`

Whether the build should fail, if an error occured.

Parameters

Name | Type | Description
--- | --- | ---
$value | boolean |

`setLocation( ) : void`

`setOwningTarget( ) : void`

`setProject( ) : void`

`setRuntimeConfigurableWrapper( ) : void`

`setSuffix( string $value ) : void`

Define if the task should or not use a suffix (-min is the default)

Parameters

Name | Type | Description
--- | --- | ---
$value | string |

`setTargetDir( string $targetDir ) : void`

sets the directory where minified javascript files should be put inot

Parameters

Name | Type | Description
--- | --- | ---
$targetDir | string |

`setTaskName( ) : void`

`setTaskType( ) : void`

Documentation was generated by DocBlox 0.17.1.