在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):documentationjs/gulp-documentation开源软件地址(OpenSource Url):https://github.com/documentationjs/gulp-documentation开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-documentationUse gulp with documentation to generate great documentation for your JavaScript projects. Installation$ npm install --save-dev gulp-documentation APIdocumentationDocumentation stream intended for use within the gulp system. Parameters
Examples var gulpDocumentation = require('gulp-documentation');
var gulp = require('gulp');
// Out of the box, you can generate JSON, HTML, and Markdown documentation
gulp.task('documentation-readme-example', function () {
// Generating README documentation
return gulp.src('./index.js')
.pipe(gulpDocumentation('md'))
.pipe(gulp.dest('md-documentation'));
});
// Generating a pretty HTML documentation site
gulp.task('documentation-html-example', function () {
return gulp.src('./index.js')
.pipe(gulpDocumentation('html'))
.pipe(gulp.dest('html-documentation'));
});
// Generating raw JSON documentation output
gulp.task('documentation-json-example', function () {
return gulp.src('./index.js')
.pipe(gulpDocumentation('json'))
.pipe(gulp.dest('json-documentation'));
});
// Generate documentation for multiple files using normal glob syntax.
// Note that this generates one documentation output, so that it can
// easily cross-reference and use types.
gulp.task('documentation-multiple-files', function () {
return gulp.src('./src/*.js')
.pipe(gulpDocumentation('md'))
.pipe(gulp.dest('md-documentation'));
});
// If you're using HTML documentation, you can specify additional 'name'
// and 'version' options
gulp.task('documentation-html-options', function () {
return gulp.src('./src/*.js')
.pipe(gulpDocumentation('html', {}, {
name: 'My Project',
version: '1.0.0'
}))
.pipe(gulp.dest('html-documentation'));
});
// Document non-JavaScript files with JSDoc comments using polyglot: true
gulp.task('documentation-for-cplusplus', function () {
return gulp.src('./src/*.cpp')
.pipe(gulpDocumentation('html', { polyglot: true }, {
name: 'My Project',
version: '1.0.0'
}))
.pipe(gulp.dest('html-documentation'));
}); Returns stream.Transform |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论