wulp
Wulp allows you to define Gulp tasks that can be run directly, and also via a watch
task.
Registering Wulp
Wulp tasks don't do anything on their own; you must first register them with gulp via wulp.register
:
wulp.register(gulp, 'watch');
Defining a Task
var eslint = require('gulp-eslint');
var gulp = require('gulp');
var wulp = require('wulp');
wulp.task('test:style', ['{src,test}/**/*.js'], (srcs) => {
return srcs
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
Advanced Options
Wulp tasks support additional configuration via a third argument:
wulp.task('test:style', ['{src,test}/**/*.js'], {runAll: ['.eslintrc*']}, (srcs) => {
The supported options are:
runAll
: Accepts an array of glob expressions. When a file matching that expression changes, the task will be run with all files matching the primary glob. Great for re-running all tests after changing test configuration, for example.
License
This project is covered under the Apache License, version 2.0.