jsdoc.js
function (infos, name) {
    name = name || 'jsdoc.json';

    var firstFile = null;
    var readme = null;

    var wp = new Parser(infos);

    var bufferFiles = function(file, enc, next){
      if (file.isNull()) return; // ignore
      if (file.isStream()) return this.emit('error', new PluginError('gulp-jsdoc',  'Streaming not supported'));

      // Store firstFile to get a base and cwd later on
      if (!firstFile)
        firstFile = file;

      if (/[.]js$/i.test(file.path))
        wp.parse(file);
      else if(/readme(?:[.]md)?$/i.test(file.path))
        readme = marked(file.contents.toString('utf8'));

      next();
    };

    var endStream = function(conclude){
      // Nothing? Exit right away
      if (!firstFile){
        conclude();
        return;
      }

      var data;
      try{
        data = JSON.stringify(wp.complete(), null, 2);
        // data = parser(options, filemap));
      }catch(e){
        return this.emit('error', new PluginError('gulp-jsdoc',
          'Oooooh! Failed parsing with jsdoc. What did you do?! ' + e));
      }

      // Pump-up the generated output
      var vinyl = new File({
        cwd: firstFile.cwd,
        base: firstFile.base,
        path: path.join(firstFile.base, name),
        contents: new Buffer(data)
      });

      // Possibly stack-up the readme, if there was any in the first place
      vinyl.readme = readme;

      // Add that to the stream...
      this.push(vinyl);

      conclude();
    };

    // That's it for the parser
    return through2.obj(bufferFiles, endStream);
  }
function (infos, name) {
    name = name || 'jsdoc.json';

    var firstFile = null;
    var readme = null;

    var wp = new Parser(infos);

    var bufferFiles = function(file, enc, next){
      if (file.isNull()) return; // ignore
      if (file.isStream()) return this.emit('error', new PluginError('gulp-jsdoc',  'Streaming not supported'));

      // Store firstFile to get a base and cwd later on
      if (!firstFile)
        firstFile = file;

      if (/[.]js$/i.test(file.path))
        wp.parse(file);
      else if(/readme(?:[.]md)?$/i.test(file.path))
        readme = marked(file.contents.toString('utf8'));

      next();
    };

    var endStream = function(conclude){
      // Nothing? Exit right away
      if (!firstFile){
        conclude();
        return;
      }

      var data;
      try{
        data = JSON.stringify(wp.complete(), null, 2);
        // data = parser(options, filemap));
      }catch(e){
        return this.emit('error', new PluginError('gulp-jsdoc',
          'Oooooh! Failed parsing with jsdoc. What did you do?! ' + e));
      }

      // Pump-up the generated output
      var vinyl = new File({
        cwd: firstFile.cwd,
        base: firstFile.base,
        path: path.join(firstFile.base, name),
        contents: new Buffer(data)
      });

      // Possibly stack-up the readme, if there was any in the first place
      vinyl.readme = readme;

      // Add that to the stream...
      this.push(vinyl);

      conclude();
    };

    // That's it for the parser
    return through2.obj(bufferFiles, endStream);
  }
function ( infos , name ) { name = name || 'jsdoc.json' ; var firstFile = null ; var readme = null ; var wp = new Parser ( infos ) ; var bufferFiles = function ( file , enc , next ) { if ( file . isNull ( ) ) return ; // ignore
 if ( file . isStream ( ) ) return this . emit ( 'error' , new PluginError ( 'gulp-jsdoc' , 'Streaming not supported' ) ) ; // Store firstFile to get a base and cwd later on
 if ( ! firstFile ) firstFile = file ; if ( / [.]js$ / i . test ( file . path ) ) wp . parse ( file ) ; else if ( / readme(?:[.]md)?$ / i . test ( file . path ) ) readme = marked ( file . contents . toString ( 'utf8' ) ) ; next ( ) ; } ; var endStream = function ( conclude ) { // Nothing? Exit right away
 if ( ! firstFile ) { conclude ( ) ; return ; } var data ; try { data = JSON . stringify ( wp . complete ( ) , null , 2 ) ; // data = parser(options, filemap));
 } catch ( e ) { return this . emit ( 'error' , new PluginError ( 'gulp-jsdoc' , 'Oooooh! Failed parsing with jsdoc. What did you do?! ' + e ) ) ; } // Pump-up the generated output
 var vinyl = new File ( { cwd : firstFile . cwd , base : firstFile . base , path : path . join ( firstFile . base , name ) , contents : new Buffer ( data ) } ) ; // Possibly stack-up the readme, if there was any in the first place
 vinyl . readme = readme ; // Add that to the stream...
 this . push ( vinyl ) ; conclude ( ) ; } ; // That's it for the parser
 return through2 . obj ( bufferFiles , endStream ) ; }
That's the plugin parser
That s the plugin parser