CleanCssFilter
extends BaseNodeFilter
in package
CleanCss filter.
Tags
Table of Contents
- $cleanCssBin : mixed
- $compatibility : mixed
- $debug : mixed
- $keepLineBreaks : mixed
- $mediaMerging : mixed
- $nodeBin : mixed
- $nodePaths : mixed
- $onlyKeepFirstSpecialComment : mixed
- $removeSpecialComments : mixed
- $rootPath : mixed
- $roundingPrecision : mixed
- $semanticMerging : mixed
- $skipAdvanced : mixed
- $skipAggresiveMerging : mixed
- $skipImport : mixed
- $skipImportFrom : mixed
- $skipRebase : mixed
- $skipRestructuring : mixed
- $skipShorthandCompacting : mixed
- $sourceMap : mixed
- $sourceMapInlineSources : mixed
- $timeout : mixed
- __construct() : mixed
- addNodePath() : mixed
- filterDump() : mixed
- Run the asset through CleanCss
- filterLoad() : mixed
- getNodePaths() : mixed
- setCompatibility() : mixed
- Force compatibility mode (see https://github.com/jakubpawlowicz/clean-css/blob/master/README.md#how-to-set-compatibility-mode for advanced examples)
- setDebug() : mixed
- Shows debug information (minification time & compression efficiency)
- setKeepLineBreaks() : mixed
- Keep line breaks
- setMediaMerging() : mixed
- Disable @media merging
- setNodePaths() : mixed
- setOnlyKeepFirstSpecialComment() : mixed
- Remove all special comments except the first one
- setRemoveSpecialComments() : mixed
- Remove all special comments
- setRootPath() : mixed
- A root path to which resolve absolute @import rules
- setRoundingPrecision() : mixed
- Rounds to `N` decimal places. Defaults to 2. -1 disables rounding.
- setSemanticMerging() : mixed
- Enables unsafe mode by assuming BEM-like semantic stylesheets (warning, this may break your styling!)
- setSkipAdvanced() : mixed
- Disable advanced optimizations - selector & property merging, reduction, etc.
- setSkipAggresiveMerging() : mixed
- Disable properties merging based on their order
- setSkipImport() : mixed
- Disable @import processing
- setSkipImportFrom() : mixed
- Disable @import processing for specified rules
- setSkipRebase() : mixed
- Disable URLs rebasing
- setSkipRestructuring() : mixed
- Disable restructuring optimizations
- setSkipShorthandCompacting() : mixed
- Disable shorthand compacting
- setSourceMap() : mixed
- Enables building input's source map
- setSourceMapInlineSources() : mixed
- Enables inlining sources inside source maps
- setTimeout() : mixed
- Per connection timeout when fetching remote @imports; defaults to 5 seconds
- createProcessBuilder() : ProcessBuilder
- Creates a new process builder.
- mergeEnv() : mixed
Properties
$cleanCssBin
private
mixed
$cleanCssBin
$compatibility
private
mixed
$compatibility
$debug
private
mixed
$debug
$keepLineBreaks
private
mixed
$keepLineBreaks
$mediaMerging
private
mixed
$mediaMerging
$nodeBin
private
mixed
$nodeBin
$nodePaths
private
mixed
$nodePaths
= array()
$onlyKeepFirstSpecialComment
private
mixed
$onlyKeepFirstSpecialComment
$removeSpecialComments
private
mixed
$removeSpecialComments
$rootPath
private
mixed
$rootPath
$roundingPrecision
private
mixed
$roundingPrecision
$semanticMerging
private
mixed
$semanticMerging
$skipAdvanced
private
mixed
$skipAdvanced
$skipAggresiveMerging
private
mixed
$skipAggresiveMerging
$skipImport
private
mixed
$skipImport
= true
$skipImportFrom
private
mixed
$skipImportFrom
$skipRebase
private
mixed
$skipRebase
$skipRestructuring
private
mixed
$skipRestructuring
$skipShorthandCompacting
private
mixed
$skipShorthandCompacting
$sourceMap
private
mixed
$sourceMap
$sourceMapInlineSources
private
mixed
$sourceMapInlineSources
$timeout
private
mixed
$timeout
Methods
__construct()
public
__construct([string $cleanCssBin = '/usr/bin/cleancss' ][, string $nodeBin = null ]) : mixed
Parameters
- $cleanCssBin : string = '/usr/bin/cleancss'
-
Absolute path to the cleancss 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 CleanCss
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 —setCompatibility()
Force compatibility mode (see https://github.com/jakubpawlowicz/clean-css/blob/master/README.md#how-to-set-compatibility-mode for advanced examples)
public
setCompatibility(string $compatibility) : mixed
Parameters
- $compatibility : string
Return values
mixed —setDebug()
Shows debug information (minification time & compression efficiency)
public
setDebug(bool $debug) : mixed
Parameters
- $debug : bool
-
True to enable
Return values
mixed —setKeepLineBreaks()
Keep line breaks
public
setKeepLineBreaks(bool $keepLineBreaks) : mixed
Parameters
- $keepLineBreaks : bool
-
True to enable
Return values
mixed —setMediaMerging()
Disable @media merging
public
setMediaMerging(bool $mediaMerging) : mixed
Parameters
- $mediaMerging : 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 —setOnlyKeepFirstSpecialComment()
Remove all special comments except the first one
public
setOnlyKeepFirstSpecialComment(bool $onlyKeepFirstSpecialComment) : mixed
Parameters
- $onlyKeepFirstSpecialComment : bool
-
True to enable
Return values
mixed —setRemoveSpecialComments()
Remove all special comments
public
setRemoveSpecialComments(bool $removeSpecialComments) : mixed
Parameters
- $removeSpecialComments : bool
-
True to enable
Return values
mixed —setRootPath()
A root path to which resolve absolute @import rules
public
setRootPath(string $rootPath) : mixed
Parameters
- $rootPath : string
Return values
mixed —setRoundingPrecision()
Rounds to `N` decimal places. Defaults to 2. -1 disables rounding.
public
setRoundingPrecision(int $roundingPrecision) : mixed
Parameters
- $roundingPrecision : int
Return values
mixed —setSemanticMerging()
Enables unsafe mode by assuming BEM-like semantic stylesheets (warning, this may break your styling!)
public
setSemanticMerging(bool $semanticMerging) : mixed
Parameters
- $semanticMerging : bool
-
True to enable
Return values
mixed —setSkipAdvanced()
Disable advanced optimizations - selector & property merging, reduction, etc.
public
setSkipAdvanced(bool $skipAdvanced) : mixed
Parameters
- $skipAdvanced : bool
-
True to enable
Return values
mixed —setSkipAggresiveMerging()
Disable properties merging based on their order
public
setSkipAggresiveMerging(bool $skipAggresiveMerging) : mixed
Parameters
- $skipAggresiveMerging : bool
-
True to enable
Return values
mixed —setSkipImport()
Disable @import processing
public
setSkipImport(bool $skipImport) : mixed
Parameters
- $skipImport : bool
-
True to enable
Return values
mixed —setSkipImportFrom()
Disable @import processing for specified rules
public
setSkipImportFrom(string $skipImportFrom) : mixed
Parameters
- $skipImportFrom : string
Return values
mixed —setSkipRebase()
Disable URLs rebasing
public
setSkipRebase(bool $skipRebase) : mixed
Parameters
- $skipRebase : bool
-
True to enable
Return values
mixed —setSkipRestructuring()
Disable restructuring optimizations
public
setSkipRestructuring(bool $skipRestructuring) : mixed
Parameters
- $skipRestructuring : bool
-
True to enable
Return values
mixed —setSkipShorthandCompacting()
Disable shorthand compacting
public
setSkipShorthandCompacting(bool $skipShorthandCompacting) : mixed
Parameters
- $skipShorthandCompacting : bool
-
True to enable
Return values
mixed —setSourceMap()
Enables building input's source map
public
setSourceMap(bool $sourceMap) : mixed
Parameters
- $sourceMap : bool
-
True to enable
Return values
mixed —setSourceMapInlineSources()
Enables inlining sources inside source maps
public
setSourceMapInlineSources(bool $sourceMapInlineSources) : mixed
Parameters
- $sourceMapInlineSources : bool
-
True to enable
Return values
mixed —setTimeout()
Per connection timeout when fetching remote @imports; defaults to 5 seconds
public
setTimeout(int $timeout) : mixed
Parameters
- $timeout : int
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