Created
April 10, 2012 15:49
-
-
Save devster/2352313 to your computer and use it in GitHub Desktop.
Lessmin driver for npAssetsOptimizerPlugin for sf1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once sfConfig::get('sf_lib_dir').'/vendor/lessphp/lessc.inc.php'; | |
class npDriverLessmin extends npDriverBase | |
{ | |
public function doProcessFile($file, $replace = false) | |
{ | |
$lessc = new lessc($file); | |
$optimizedContent = cssmin::minify($lessc->parse()); | |
if ($replace) | |
{ | |
return parent::replaceFile($file, $optimizedContent); | |
} | |
else | |
{ | |
return $optimizedContent; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment