Skip to content

Instantly share code, notes, and snippets.

@mishbah
Created August 21, 2015 00:54
Show Gist options
  • Save mishbah/b144e73fcc2bb2caf393 to your computer and use it in GitHub Desktop.
Save mishbah/b144e73fcc2bb2caf393 to your computer and use it in GitHub Desktop.
Gulpfile for TDD
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']);
@mishbah
Copy link
Author

mishbah commented Aug 21, 2015

This is for windows version
For mac you can use https://gist.github.com/52a9f085408605a06400.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment