Skip to content
This repository was archived by the owner on Jul 26, 2023. It is now read-only.

Commit

Permalink
added $ignoredPaths parameter to EAssetManagerBoost, which allows to …
Browse files Browse the repository at this point in the history
…specify paths that should not be minified

taken from a fork of escriptboost: see urmaul@5f985cc
  • Loading branch information
adeg committed Apr 10, 2014
1 parent 0b32e7f commit 2c33f68
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions EAssetManagerBoost.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@
*/
class EAssetManagerBoost extends CAssetManager {

/**
* @var array $ignoredPaths specify the path parts that
* the extension will check against in order to not compress/minify the
* files/directories.
*/
public $ignoredPaths = array(
'bootstrap',
'ckeditor',
'highcharts',
);
/**
* @var mixed $minifiedExtensionFlags specify the extension names that
* the extension will check against in order to not compress/minify the
Expand Down Expand Up @@ -87,6 +97,9 @@ public function publish($path, $hashByName=false, $level=-1, $forceCopy=false)
return $this->_published[$path];
else if (($src = realpath($path)) !== false)
{
if ($this->strpos_arr($path, $this->ignoredPaths))
return parent::publish($path, $hashByName, $level, $forceCopy);

if (is_file($src))
{
$dir = $this->hash($hashByName ? basename($src) : dirname($src));
Expand Down

0 comments on commit 2c33f68

Please sign in to comment.