Пример #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());
 }