示例#1
0
 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);
 }
示例#2
0
 protected function compress()
 {
     try {
         return Process::uglifyjs(['-mc', 'warnings=false'], parent::compress());
     } catch (Exceptions\ProcessFailure $e) {
         throw new Exceptions\SyntaxError($this, $e->error);
     }
 }
示例#3
0
 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);
     }
 }
示例#4
0
 /**
  * @return int
  */
 public function mtime()
 {
     return max($this->owner->mtime(), $this->dependencies()->mtime());
 }