Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use gulp with documentation to generate great documentation for your JavaScript projects.

License

NotificationsYou must be signed in to change notification settings

documentationjs/gulp-documentation

Repository files navigation

Circle CIGreenkeeper badge

Usegulp withdocumentationto generate great documentation for your JavaScript projects.

Installation

$ npm install --save-dev gulp-documentation

API

documentation

Documentation stream intended for use within the gulp system.

Parameters

  • formatstring? format - one of 'html', 'md', or 'json' (optional, defaultmd)
  • optionsObject documentation options - the same as given todocumentation
    • options.filenamestring custom filename for md or json output
  • formatterOptionsObject output options - same as given to documentation
    • formatterOptions.nameObject if format is HTML, specifies the name of the project

Examples

vargulpDocumentation=require('gulp-documentation');vargulp=require('gulp');//  Out of the box, you can generate JSON, HTML, and Markdown documentationgulp.task('documentation-readme-example',function(){// Generating README documentationreturngulp.src('./index.js').pipe(gulpDocumentation('md')).pipe(gulp.dest('md-documentation'));});// Generating a pretty HTML documentation sitegulp.task('documentation-html-example',function(){returngulp.src('./index.js').pipe(gulpDocumentation('html')).pipe(gulp.dest('html-documentation'));});// Generating raw JSON documentation outputgulp.task('documentation-json-example',function(){returngulp.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(){returngulp.src('./src/*.js').pipe(gulpDocumentation('md')).pipe(gulp.dest('md-documentation'));});// If you're using HTML documentation, you can specify additional 'name'// and 'version' optionsgulp.task('documentation-html-options',function(){returngulp.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: truegulp.task('documentation-for-cplusplus',function(){returngulp.src('./src/*.cpp').pipe(gulpDocumentation('html',{polyglot:true},{name:'My Project',version:'1.0.0'})).pipe(gulp.dest('html-documentation'));});

Returnsstream.Transform

About

Use gulp with documentation to generate great documentation for your JavaScript projects.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors8


[8]ページ先頭

©2009-2025 Movatter.jp