在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):deshaw/gulp-jsdoc3开源软件地址(OpenSource Url):https://github.com/deshaw/gulp-jsdoc3开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-jsdoc3InstallationInstall npm install --save-dev gulp-jsdoc3 Usageconst jsdoc = require('gulp-jsdoc3');
gulp.task('doc', function (cb) {
gulp.src(['README.md', './src/**/*.js'], {read: false})
.pipe(jsdoc(cb));
}); By default, documentation is output to You can also pass in your own config to override the defaults. All CLI options can be specified here. const jsdoc = require('gulp-jsdoc3');
gulp.task('doc', function (cb) {
const config = require('./jsdoc.json');
gulp.src(['README.md', './src/**/*.js'], {read: false})
.pipe(jsdoc(config, cb));
}); Another good example is in this project's gulpfile! Overriding the default layoutink-docstrap is used as the default layout but you can easily override it in your config like this:
Other config tips and tricksUse include and exclude patterns to filter the globs from gulp even more. For example, only include .js,.jsdoc, or .jsx files that do not start with _:
If you want to document multiple markdown or html files, enable tutorial support:
DebuggingSet env variable: NotesThis is a reasonable attempt to wrap jsdoc using gulp as thinly as possible use the jsdoc config to pass in files from gulp. jsdoc does not allow for piped input, so this attempt may be considered a gulp anti-pattern. It also does not pass on output to be piped elsewhere. We would like to thank Mangled Deutz @ gulp-jsdoc for the original implementation. HistoryThis plugin was contributed back to the community by the D. E. Shaw group. License |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论