code: function toGCode() {
      if (rasterToGcode.running) {
          return rasterToGcode.abort();
      }
  
      console.log('toGCode:', file.name);
      $toGCode.text('Abort').addClass('btn-danger');
      $progressBar.removeClass('progress-bar-danger');
      $progressBar.parent().show();
      rasterToGcode.run();
  }
docs: To gcode