gulp Create documentation with gulp-jsdoc3 Installation

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

First of all, install gulp and gulp-jsdoc3 to your project:

npm install gulp-jsdoc3 --save-dev

Then add it to your gulpfile.js

var gulp = require('gulp');
var jsdoc = require('gulp-jsoc3');



gulp.task('doc', function (cb){
    gulp.src('src/*.js')
    .pipe(jsdoc(cb));
});

In order to documentate, for example, a function, you have to add a comment just at the top of the function, like this:

/**
 * @function example
 * @summary This is a short description of example
 * @author Whoever
 * @param {any} cb
 * @returns 
 */
function example(cb){
    //Code
}

If you want to know more block tags to use, please visit usejsdoc.org



Got any gulp Question?