Skip to content

Instantly share code, notes, and snippets.

@dariodiaz
Forked from BradEstey/gulpfile.js
Created January 23, 2014 00:37
Show Gist options
  • Save dariodiaz/8570564 to your computer and use it in GitHub Desktop.
Save dariodiaz/8570564 to your computer and use it in GitHub Desktop.
config php gulp: gulp config for phpunit tests
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