0.0.8 • Published 9 years ago

gulp-outliner v0.0.8

Weekly downloads
19
License
-
Repository
github
Last release
9 years ago

gulp-outliner

A Gulp plugin for creating a document-outline (table of contents) based on a structured HTML document arriving as a stream, it injects the outline into the stream (at a predetermined point), and passes the stream on for the next plugin to work on.

Install

npm install gulp-outliner --save-dev

Example

Using gulp-outliner

In your HTML create a placeholder for the outline. The outline is appended to the content of an element whose id is contents. For example:

<div id="contents">
    <h1>Contents</h1>
</div>

In your gulp file add

var gulp = require('gulp');
var gulp_outliner = require('gulp-outliner');

// example task
gulp.task('outline',
    function () {
        return gulp.src("./test/input/*.html")
        .pipe(gulp_outliner()) // add toc
        .pipe(gulp.dest('./test/output/'));
    }
);

Then run gulp outline from the command line.

Development

Testing

To do

See the issues page.