UglifyJsFilter
extends BaseNodeFilter
in package
UglifyJs filter.
Tags
Table of Contents
- $beautify : mixed
- $defines : mixed
- $mangle : mixed
- $noCopyright : mixed
- $nodeBin : mixed
- $nodePaths : mixed
- $timeout : mixed
- $uglifyjsBin : mixed
- $unsafe : mixed
- __construct() : mixed
- addNodePath() : mixed
- filterDump() : mixed
- Run the asset through UglifyJs
- filterLoad() : mixed
- getNodePaths() : mixed
- setBeautify() : mixed
- Output indented code
- setDefines() : mixed
- setMangle() : mixed
- Safely mangle variable and function names for greater file compress.
- setNoCopyright() : mixed
- Removes the first block of comments as well
- setNodePaths() : mixed
- setTimeout() : mixed
- Set the process timeout.
- setUnsafe() : mixed
- Enable additional optimizations that are known to be unsafe in some situations.
- createProcessBuilder() : ProcessBuilder
- Creates a new process builder.
- mergeEnv() : mixed
Properties
$beautify
private
mixed
$beautify
$defines
private
mixed
$defines
$mangle
private
mixed
$mangle
$noCopyright
private
mixed
$noCopyright
$nodeBin
private
mixed
$nodeBin
$nodePaths
private
mixed
$nodePaths
= array()
$timeout
private
mixed
$timeout
$uglifyjsBin
private
mixed
$uglifyjsBin
$unsafe
private
mixed
$unsafe
Methods
__construct()
public
__construct([string $uglifyjsBin = '/usr/bin/uglifyjs' ][, string $nodeBin = null ]) : mixed
Parameters
- $uglifyjsBin : string = '/usr/bin/uglifyjs'
-
Absolute path to the uglifyjs executable
- $nodeBin : string = null
-
Absolute path to the folder containg node.js executable
Return values
mixed —addNodePath()
public
addNodePath(mixed $nodePath) : mixed
Parameters
- $nodePath : mixed
Return values
mixed —filterDump()
Run the asset through UglifyJs
public
filterDump(AssetInterface $asset) : mixed
Parameters
- $asset : AssetInterface
Tags
Return values
mixed —filterLoad()
public
filterLoad(AssetInterface $asset) : mixed
Parameters
- $asset : AssetInterface
Tags
Return values
mixed —getNodePaths()
public
getNodePaths() : mixed
Return values
mixed —setBeautify()
Output indented code
public
setBeautify(bool $beautify) : mixed
Parameters
- $beautify : bool
-
True to enable
Return values
mixed —setDefines()
public
setDefines(array<string|int, mixed> $defines) : mixed
Parameters
- $defines : array<string|int, mixed>
Return values
mixed —setMangle()
Safely mangle variable and function names for greater file compress.
public
setMangle(bool $mangle) : mixed
Parameters
- $mangle : bool
-
True to enable
Return values
mixed —setNoCopyright()
Removes the first block of comments as well
public
setNoCopyright(bool $noCopyright) : mixed
Parameters
- $noCopyright : bool
-
True to enable
Return values
mixed —setNodePaths()
public
setNodePaths(array<string|int, mixed> $nodePaths) : mixed
Parameters
- $nodePaths : array<string|int, mixed>
Return values
mixed —setTimeout()
Set the process timeout.
public
setTimeout(int $timeout) : mixed
Parameters
- $timeout : int
-
The timeout for the process
Return values
mixed —setUnsafe()
Enable additional optimizations that are known to be unsafe in some situations.
public
setUnsafe(bool $unsafe) : mixed
Parameters
- $unsafe : bool
-
True to enable
Return values
mixed —createProcessBuilder()
Creates a new process builder.
protected
createProcessBuilder([array<string|int, mixed> $arguments = array() ]) : ProcessBuilder
Parameters
- $arguments : array<string|int, mixed> = array()
-
An optional array of arguments
Return values
ProcessBuilder —A new process builder
mergeEnv()
protected
mergeEnv(ProcessBuilder $pb) : mixed
Parameters
- $pb : ProcessBuilder