0.1.11 • Published 10 years ago

gulp-docdown v0.1.11

Weekly downloads
46
License
-
Repository
github
Last release
10 years ago

gulp-docdown

gulp-docdown is a plugin to docdown :)

Snapshots

style-default

Install

npm install gulp-docdown gulp-rename 

Usage(in gulpfile.js)

var gulp = require('gulp'),
    gulpDocDown = require('gulp-docdown'),
    rename = require('gulp-rename')
    ;

gulp.task('gulpDocDown', function(){
    // 'html' or 'md'
    var outputType = 'html';
    gulp.src('./*.js')
    .pipe(gulpDocDown({
        // {fileName} will replace by file name, define for docDown.
        title: 'API documentation / {fileName}',    
        // {filePath} will replace by file path, define for docDown.
        url: 'https://github.com/xxx/xxx/blob/master/{filePath}',
        // topic group type , define for docDown.
        toc: 'categories', 
        // the outputType : 'html' or 'md' , 'md' default.
        outputType : outputType,
        // [optional] define the html template, 'default' default.
        // htmlStyle : 'default'
        // [optional] or DIY your template, <%- title %> & <%- htmlContent %> will be relaced.
        // htmlTpl : '<!DOCTYPE html><html><head><title><%- title %></title><head><body><%- htmlContent %></body></html>'
    }))
    .pipe(rename({
        extname: '.' + outputType
    }))
    .pipe(gulp.dest('./output'));
});

gulp.task('default', ['gulpDocDown']);

License

MIT License

0.1.11

10 years ago

0.1.10

10 years ago

0.1.9

10 years ago

0.1.8

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago