src/index.js
/**
   * Resolves accumulated promises and writes report to file system.
   * @param  {Function}  done Done callback.
   * @return {undefined}      Nothing is returned (done callback is used instead).
   */
Resolves accumulated promises and writes report to file system.
@param  {Function}  done Done callback.
@return {undefined}      Nothing is returned (done callback is used instead).
Resolves accumulated promises and writes report to file system . @param { Function } done Done callback . @return { undefined } Nothing is returned ( done callback is used instead ) .
function onStreamEnd(done) {
    Promise
      .all(promiseList)
      .then(provideResultsToReporters)
      .then(() => done())
      .catch(error => {
        try {
          this.emit('error', new gulpUtil.PluginError(pluginName, error));
        } catch (e) {
        }
        done();
      });
  }
function onStreamEnd ( done ) { Promise . all ( promiseList ) . then ( provideResultsToReporters ) . then ( ( ) => done ( ) ) . catch ( error => { try { this . emit ( 'error' , new gulpUtil . PluginError ( pluginName , error ) ) ; } catch ( e ) { } done ( ) ; } ) ; }
Resolves accumulated promises and writes report to file system.
Resolves accumulated promises and writes report to file system .
// For some reason we need to wrap `emit` in a try-catch block // because it immediately throws the given error and the `done` // callback is never called as a result. // ¯\_(シ)_/¯