Created
August 21, 2015 00:54
-
-
Save mishbah/b144e73fcc2bb2caf393 to your computer and use it in GitHub Desktop.
Gulpfile for TDD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var phpspec = require('gulp-phpspec'); | |
var run = require('gulp-run'); | |
var notify = require('gulp-notify'); | |
gulp.task('test', function(){ | |
run('clear', {'usePowerShell': true}).exec('Vinyl', function(){ | |
gulp.src('spec/**/*.php') | |
.pipe(phpspec('', { notify: true})) | |
.on('error', notify.onError({ | |
title: 'Dongdong', | |
message: 'Testnya gagal agan Misbah', | |
})) | |
.pipe(notify({ | |
title: 'Alhamdulillah', | |
message: 'Semua berjalan lancar' | |
})); | |
}); | |
}); | |
gulp.task('watch', function () { | |
gulp.watch(['spec/**/*.php', 'src/**/*.php'], ['test']) | |
}); | |
gulp.task('default', ['watch']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is for windows version
For mac you can use https://gist.github.com/52a9f085408605a06400.git