gulp-colorfulkits
v0.2.1
Published
Make gulp log colorful
Downloads
3
Readme
gulp-colorfulkits:lollipop:
Usage
npm i --save-dev gulp-colorfulkits
const {
colorful,
gulpColorfulEslint,
gulpWatchColorful,
watchColorful,
} = require("gulp-colorfulkits");
colorful(options)
gulp.src('./src/*.js')
.pipe(colorful())//Output Colorful DestLog
.pipe(gulp.dest('./dest/'));
[object]options = {color, cwd, indent}
- [string]color
- ansi-colors text-color enum
- default:
cyan
- [string]cwd
- vinyl cwd
- default:
.
- [integer]indent
- indent-level
- default:
1
colorful.preset(options);
const customColorful = colorful.preset({color:"green"});
gulp.src('./src/**/*.js')
.pipe(customColorful())
.pipe(gulp.dest('./dest/'));
[object]options
same
gulpColorfulEslint()
gulp.src('./src/**/*.js')
.pipe(gulpColorfulEslint())
//like .pipe(eslint()).pipe(eslint.result())
gulpWatchColorful(glob, callback, options)
gulpWatchColorful("./src/**/*.js",function(){
//callback
});
//like gulp.watch(glob,callback)
- [string]glob
- [function]callback
- called when file changed.
- [object]options
- [boolean]ignoreDirectoryEvents
- default
true
- default
- [boolean]ignoreDirectoryEvents
watchColorful(glob)
watchColorful("./src/**/*.js")
.pipe(gulp.dest("./dest/"));
//like require("gulp-watch")(glob)
- [string]glob