Gulp plugin for styledocco that supports incremental building
npm install gulp-styledocco-individualgulp-styledocco-individual
===========================


Gulp plugin for StyleDocco and supports incremental building.
SytleDocco is a great documentation tool for CSS/Less/Sass and so on.
And now, this tool does not support incremental building.
Because generated docuents have navigations to each others.
So we can not generate documents incrementally.
But we can generate documents individually, and then we can do incremental building.
For example:
- StyleDocco (not individual):
- path/to/file.css -> path/to/docs/file.html
- path/to/sub/file.css -> path/to/docs/sub-file.html
- These documents include navigations for each others.
- StyleDocco (individual):
- path/to/file.css -> path/to/docs/file.css/file.html
- path/to/sub/file.css -> path/to/docs/sub/file.css/file.html
- These documents do NOT include navigations for each others.
Example
-------
``javascript
var gulp = require('gulp');
var styledocco = require('gulp-styledocco-individual').styledoccoIndividual;
gulp.task('docs', () => {
return gulp.src('css/*/.css')
.pipe(styledocco({ out: 'docs' }));
});
`
And this plugin pass through got files when processing is done.
So, you can write:
`javascript
var gulp = require('gulp');
var styledocco = require('gulp-styledocco-individual').styledoccoIndividual;
var autoprefixer = require('gulp-autoprefixer');
gulp.task('docs', () => {
return gulp.src('css/*/.css')
.pipe(styledocco({ out: 'docs' }))
.pipe(autoprefixer())
.pipe(gulp.dest('built'));
});
`
See Using ES6 with gulp.
`javascript
import gulp from 'gulp';
import {styledoccoIndividual} from 'gulp-styledocco-individual';
gulp.task('docs', () => {
return gulp.src('css/*/.css')
.pipe(styledoccoIndividual({ out: 'docs' }));
});
`
Install
-------
`sh-session`
$ npm install --save-dev gulp-styledocco-individual
Options
-------
| Option Name | Type | Optional | Default |
|:----------------|:-----------|:---------|:------------------------------------------|
| out | string | yes | 'docs' |name
| | string | yes | name property of package.json or '' |includes
| | string[] | yes | None |verbose
| | boolean | yes | false |noMinify
| | boolean | yes | false |preprocessor
| | string | yes | None |styledocco
| | string | yes | ./node_modules/.bin/styledocco |
An output directory.
It can be a relative path from the cwd.
A name of the generated document.
It will be used as the document page title.
Included files for the preview in the generated documentation.
It can be a relative path from the cwd.
Show log messages when generating the documentation.
Disable minificating CSS/JavaScript in the generated documentation.
A file path for the CSS preprocessor such as '~/bin/lessc'.
It can be a relative path from the cwd.
A file path for the StyleDocco command such as '~/bin/styledocco'.
It can be a relative path from the cwd.
Other API
---------
Returns a file path to the doc.
This function is useful for incremental building.
File path to document.
$3
Type: stringBase path of the filePath.
Typically, it should be vinyl.base.
$3
Type: { out: string | undefined | null } or undefined or null
Options for gulp-styledocco-individual.
$3
Type: string`File path to the doc.
License
-------
MIT