Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var gulp = require('gulp'),
- sys = require('sys'),
- ssh2 = require('ssh2');
- gulp.task('phpunit', function() {
- var ssh = new ssh2();
- ssh.on('ready', function () {
- ssh.exec('cd /vagrant; phpunit', {}, function (err, stream) {
- stream.on('data', function (data, extended) {
- sys.puts(data);
- });
- stream.on('end', function () {
- ssh.end();
- });
- });
- });
- ssh.connect({
- host: '127.0.0.1',
- port: 2222,
- username: 'vagrant',
- password: 'vagrant'
- });
- });
- gulp.task('default', function() {
- gulp.watch('app/**/*.php', { debounceDelay: 2000 }, ['phpunit']);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement