compile() public method

public compile ( ) : string
return string
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->logger->info('[WEBPACK]: Compiling assets...');
     $this->compiler->compile();
     $this->logger->info('[WEBPACK]: Dumping assets...');
     $this->dumper->dump(new Filesystem());
     $this->logger->debug($this->profiler->get('compiler.last_output'));
 }
 /**
  * @param GetResponseEvent $event
  */
 public function onRequest(GetResponseEvent $event)
 {
     if (!$event->isMasterRequest()) {
         return;
     }
     if ($this->tracker->isOutdated()) {
         $this->compiler->compile();
     }
     $this->dumper->dump(new Filesystem());
 }
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $output->writeln('Webpack [1/2]: Compiling Assets');
     $this->logger->info('[WEBPACK]: Compiling assets...');
     $this->compiler->compile();
     $output->writeln('Webpack [2/2]: Dumping Assets');
     $this->logger->info('[WEBPACK]: Dumping assets...');
     $this->dumper->dump();
     $message = $this->profiler->get('compiler.successful') ? sprintf('<info>Compilation done in %d ms.</info>', $this->profiler->get('compiler.performance.total')) : sprintf('<error>%s</error>', $this->profiler->get('compiler.last_output'));
     $output->writeln($message);
     $this->logger->debug($this->profiler->get('compiler.last_output'));
 }
Beispiel #4
0
 /**
  * Rebuild the cache, check to see if it's still valid and rebuild if it's outdated.
  */
 public function rebuild()
 {
     if ($this->tracker->isOutdated()) {
         $this->logger->info('[Webpack 1/2]: Compiling assets.');
         $output = $this->compiler->compile();
         $this->logger->debug($output);
         $this->logger->info('[Webpack 2/2]: Dumping assets.');
         $this->dumper->dump();
     } else {
         $this->logger->info('[Webpack]: Cache still up-to-date.');
     }
 }