-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
35 lines (30 loc) · 969 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
var gulp = require('gulp');
var phpunit = require('gulp-phpunit');
var phplint = require('gulp-phplint');
var watch = require('gulp-watch');
var notifier = require('node-notifier');
var debug = require('gulp-debug');
var map = ['src/**/*.php', 'tests/**/*.php'];
gulp.task('dev', function(cb) {
var options = {
debug: true,
statusLine: true,
configurationFile: './build/phpunit.xml'
};
watch(map, function() {
gulp
.src(map)
.pipe(phplint(''))
.pipe(phplint.reporter(function (file) {
var report = file.phplintReport || {};
if (report.error) {
/*notifier.notify({
'title': 'PhpLint',
'Message': 'Lint failed'
});*/
}
}))
.pipe(phpunit('./vendor/bin/phpunit', options))
.on('end', cb);
})
});