@hidoo/gulp-task-build-styleguide-kss
Task that build styleguide by kss for gulp.
Installation
$ npm install --save-dev gulp@next @hidoo/gulp-task-build-styleguide-kss
Usage
import {task} from 'gulp';
import buildStyleguide from '@hidoo/gulp-task-build-styleguide-kss';
task('styleguide', buildStyleguide({
src: '/path/to/css',
dest: '/path/to/dest'
}));
API
kssBuildTask
return build styleguide task by kss
Parameters
-
options
Object option (optional, default{}
)-
options.name
String task name (use as displayName) (optional, default'build:styleguide'
) -
options.src
String source path -
options.dest
String destination path -
options.css
Array<String> css paths that load to styleguide (optional, default[]
) -
options.js
Array<String> javascript paths that load to styleguide (optional, default[]
) -
options.homepage
String markdown path that load to styleguide. it must be located in the same directory with options.src (optional, defaultpath.resolve(options.source,'README.md')
) -
options.placeholder
String modifier string (optional, default'{{modifier_class}}'
) -
options.nav-depth
Number navigation depth to display (optional, default2
) -
options.mask
String masking of file that includes kss comments (optional, default'*.css'
) -
options.builder
String builder path. see: default builder (optional, defaultpath.resolve(__dirname,'../builder')
) -
options.verbose
Boolean out log or not (optional, defaultfalse
)
-
Examples
import {task} from 'gulp';
import buildStyleguide from '@hidoo/gulp-task-build-styleguide-kss';
task('styleguide', buildStyleguide({
'name': 'styleguide:main',
'src': '/path/to/css',
'dest': '/path/to/dest',
'css': ['./path/from/styleguide/to/css/extra.css'],
'js': ['./path/from/styleguide/to/js/extra.js'],
'homepage': '/path/to/README.md',
'placeholder': '{{modifier_class}}',
'nav-depth': 2,
'mask': '*.css',
'builder': '/path/to/builder',
'verbose': true
}));
Test
$ yarn test
License
MIT