public function compile()
{
if (!count($this->files) || !count($this->strings)) {
return;
}
ini_set('xdebug.max_nesting_level', 200);
$parser = new Less_Parser(['compress' => true, 'cache_dir' => $this->cachePath, 'import_dirs' => [base_path() . '/vendor/components/font-awesome/less' => '']]);
try {
foreach ($this->files as $file) {
$parser->parseFile($file);
}
foreach ($this->strings as $callback) {
$parser->parse($callback());
}
return $parser->getCss();
} catch (Less_Exception_Parser $e) {
// TODO: log an error somewhere?
}
}