Filters an asset after it has been loaded.
AssetInterface $asset An asset:
Overrides FilterInterface::filterLoad
public function filterLoad(AssetInterface $asset) {
$root = $asset
->getSourceRoot();
$path = $asset
->getSourcePath();
$lc = new \scssc();
if ($this->compass) {
new \scss_compass($lc);
}
if ($root && $path) {
$lc
->addImportPath(dirname($root . '/' . $path));
}
foreach ($this->importPaths as $path) {
$lc
->addImportPath($path);
}
$asset
->setContent($lc
->compile($asset
->getContent()));
}