original_string: protected function runGulpTask()
      {
          $this->output->writeln("<comment>Starting gulp...</comment>", OutputInterface::VERBOSITY_VERY_VERBOSE);
  
          $process = $this->createGulpProcess('steak:build');
          $callback = $this->getProcessLogger($this->output);
  
          $timer = new Stopwatch();
          $timer->start('gulp');
  
          try {
  
              $process->mustRun($callback);
  
              $this->output->writeln(
                  "<comment>gulp published in <time>{$timer->stop('gulp')->getDuration()}ms</time></comment>",
                  OutputInterface::VERBOSITY_VERBOSE
              );
  
          } catch (ProcessFailedException $exception) {
  
              $this->output->writeln(
                  "<error>gulp process failed after <time>{$timer->stop('gulp')->getDuration()}ms</time></error>",
                  OutputInterface::VERBOSITY_VERBOSE
              );
  
              if (str_contains($process->getOutput(), 'Local gulp not found') || str_contains($process->getErrorOutput(), 'Cannot find module')) {
  
                  $this->output->writeln("<comment>Missing npm dependencies, attempting install. This might take a minute...</comment>");
                  $this->output->writeln('  <comment>$</comment> npm install', OutputInterface::VERBOSITY_VERBOSE);
  
                  try {
                      $npmInstallTime = $this->runTimedTask(function () {
                          (new Process('npm install', $this->container['config']['source.directory']))->setTimeout(180)->mustRun();
                      });
  
                      $this->output->writeln("  <comment>npm installed in in <time>{$npmInstallTime}ms</time></comment>", OutputInterface::VERBOSITY_VERBOSE);
  
                      $this->output->writeln('<comment>Retrying <b>steak:publish</b> task...</comment>');
  
                      $process->mustRun($callback);
  
                  } catch (RuntimeException $exception) {
                      $this->output->writeln("We tried but <error>npm install</error> failed");
                  }
              }
  
          }
      }
code: protected function runGulpTask()
      {
          $this->output->writeln("<comment>Starting gulp...</comment>", OutputInterface::VERBOSITY_VERY_VERBOSE);
  
          $process = $this->createGulpProcess('steak:build');
          $callback = $this->getProcessLogger($this->output);
  
          $timer = new Stopwatch();
          $timer->start('gulp');
  
          try {
  
              $process->mustRun($callback);
  
              $this->output->writeln(
                  "<comment>gulp published in <time>{$timer->stop('gulp')->getDuration()}ms</time></comment>",
                  OutputInterface::VERBOSITY_VERBOSE
              );
  
          } catch (ProcessFailedException $exception) {
  
              $this->output->writeln(
                  "<error>gulp process failed after <time>{$timer->stop('gulp')->getDuration()}ms</time></error>",
                  OutputInterface::VERBOSITY_VERBOSE
              );
  
              if (str_contains($process->getOutput(), 'Local gulp not found') || str_contains($process->getErrorOutput(), 'Cannot find module')) {
  
                  $this->output->writeln("<comment>Missing npm dependencies, attempting install. This might take a minute...</comment>");
                  $this->output->writeln('  <comment>$</comment> npm install', OutputInterface::VERBOSITY_VERBOSE);
  
                  try {
                      $npmInstallTime = $this->runTimedTask(function () {
                          (new Process('npm install', $this->container['config']['source.directory']))->setTimeout(180)->mustRun();
                      });
  
                      $this->output->writeln("  <comment>npm installed in in <time>{$npmInstallTime}ms</time></comment>", OutputInterface::VERBOSITY_VERBOSE);
  
                      $this->output->writeln('<comment>Retrying <b>steak:publish</b> task...</comment>');
  
                      $process->mustRun($callback);
  
                  } catch (RuntimeException $exception) {
                      $this->output->writeln("We tried but <error>npm install</error> failed");
                  }
              }
  
          }
      }
code_tokens: protected function runGulpTask ( ) { $ this -> output -> writeln ( "<comment>Starting gulp...</comment>" , OutputInterface :: VERBOSITY_VERY_VERBOSE ) ; $ process = $ this -> createGulpProcess ( 'steak:build' ) ; $ callback = $ this -> getProcessLogger ( $ this -> output ) ; $ timer = new Stopwatch ( ) ; $ timer -> start ( 'gulp' ) ; try { $ process -> mustRun ( $ callback ) ; $ this -> output -> writeln ( "<comment>gulp published in <time>{$timer->stop('gulp')->getDuration()}ms</time></comment>" , OutputInterface :: VERBOSITY_VERBOSE ) ; } catch ( ProcessFailedException $ exception ) { $ this -> output -> writeln ( "<error>gulp process failed after <time>{$timer->stop('gulp')->getDuration()}ms</time></error>" , OutputInterface :: VERBOSITY_VERBOSE ) ; if ( str_contains ( $ process -> getOutput ( ) , 'Local gulp not found' ) || str_contains ( $ process -> getErrorOutput ( ) , 'Cannot find module' ) ) { $ this -> output -> writeln ( "<comment>Missing npm dependencies, attempting install. This might take a minute...</comment>" ) ; $ this -> output -> writeln ( '  <comment>$</comment> npm install' , OutputInterface :: VERBOSITY_VERBOSE ) ; try { $ npmInstallTime = $ this -> runTimedTask ( function ( ) { ( new Process ( 'npm install' , $ this -> container [ 'config' ] [ 'source.directory' ] ) ) -> setTimeout ( 180 ) -> mustRun ( ) ; } ) ; $ this -> output -> writeln ( "  <comment>npm installed in in <time>{$npmInstallTime}ms</time></comment>" , OutputInterface :: VERBOSITY_VERBOSE ) ; $ this -> output -> writeln ( '<comment>Retrying <b>steak:publish</b> task...</comment>' ) ; $ process -> mustRun ( $ callback ) ; } catch ( RuntimeException $ exception ) { $ this -> output -> writeln ( "We tried but <error>npm install</error> failed" ) ; } } } }
docstring: Trigger gulp to copy other assets to the build dir.
docstring_tokens: Trigger gulp to copy other assets to the build dir .