gulp-css-toc
v0.0.0
Published
Adds a TOC to the beginning of a stylesheet, taken from header comment blocks.
Downloads
2
Readme
gulp-css-toc
Appends a TOC to the beginning of a CSS file. The header must be formatted as given below.
Install
$ npm install --save-dev gulp-css-toc
Usage
var gulp = require('gulp');
var gulpCssToc = require('gulp-css-toc');
gulp.task('default', function () {
return gulp.src('src/style.css')
.pipe(gulpCssToc())
.pipe(gulp.dest('dist'));
});
Input
Headings must be styled as so:
/* ===================================================== */
/* Header Styles */
/* ===================================================== */
Output
Appended to the beginning of the file will be as so:
/*
- Header Styles
- Body Styles
- Footer Styles
*/