I'm trying to watch some files in a directory and automatically update there documentation with jsdoc. I use gulp to watch the file and run jsdoc see code below.
const gulp = require('gulp');
const watch = require('gulp-watch');
const jsdoc = require('gulp-jsdoc3');
gulp.task('doc', function(cb) {
const config = require('./jsdoc.json');
return watch(['../upload/**/*.js'], { ignoreInitial: false })
.pipe(jsdoc(config, cb));
});
When I run this task it doesn't update my jsdoc when a file is changed. Does jsdoc not work together with the watch function?