public function __construct(Asset $asset, $message, $code = null) { $message = sprintf("Error in %s:\n\n%s\n", $asset->path(), $message); if ($code !== null) { $message .= "\n{$code}\n"; } parent::__construct($message); }
protected function compress() { try { return Process::uglifyjs(['-mc', 'warnings=false'], parent::compress()); } catch (Exceptions\ProcessFailure $e) { throw new Exceptions\SyntaxError($this, $e->error); } }
protected function compress() { try { try { return Process::cleancss([], parent::compress()); } catch (Exceptions\BadInterpreter $e) { $args = ['-s', '-f', '-t', '--unix-newlines', '-t', 'compressed', '--scss']; return Process::sass($args, parent::compress()); } } catch (Exceptions\ProcessFailure $e) { throw new Exceptions\SyntaxError($this, $e->error); } }
/** * @return int */ public function mtime() { return max($this->owner->mtime(), $this->dependencies()->mtime()); }