Skip to content

Instantly share code, notes, and snippets.

@gravitano
Forked from BradEstey/gulpfile.js
Created January 30, 2014 17:34
Show Gist options
  • Save gravitano/8714105 to your computer and use it in GitHub Desktop.
Save gravitano/8714105 to your computer and use it in GitHub Desktop.
var gulp = require('gulp');
var sys = require('sys');
var exec = require('child_process').exec;
var hold = false;
gulp.task('phpunit', function() {
exec('phpunit', function(error, stdout) {
sys.puts(stdout);
hold = false;
});
});
gulp.task('default', function() {
gulp.watch('**/*.php', function(event) {
if (!hold) {
hold = true;
gulp.run('phpunit');
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment