diff --git a/gulpfile.js b/gulpfile.js index 1ebf2da..79b62e2 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -12,7 +12,7 @@ options.sourceRoot = path.join(__dirname, 'src'); var compilation = tsb.create(options); -var compile = function () { +function compile() { var ts = filter('**/*.ts', { restore: true }); var input = es.merge( gulp.src('src/**', { base: 'src', dot: true }), @@ -24,17 +24,20 @@ var compile = function () { .pipe(compilation()) .pipe(ts.restore) .pipe(gulp.dest('out')); -}; +} gulp.task('clean', function (cb) { rimraf('out', cb); }); gulp.task('compile', ['clean'], compile); -gulp.task('compile-only', compile); +gulp.task('just-compile', compile); -gulp.task('test', function (cb) { - var child = cp.spawn('mocha', ['--reporter=dot'], { stdio: 'inherit' }); +function test(cb) { + var child = cp.spawn('mocha', [], { stdio: 'inherit' }); child.on('exit', function (code) { cb(); }); -}); +} -gulp.task('watch', ['compile', 'test'], function () { - gulp.watch(['src/**', 'typings/**'], ['compile-only', 'test']); +gulp.task('test', ['compile'], test); +gulp.task('just-test', ['just-compile'], test); + +gulp.task('watch', ['test'], function () { + gulp.watch(['src/**', 'typings/**'], ['just-test']); }); diff --git a/test/mocha.opts b/test/mocha.opts index 957f28e..eb5a7c5 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -1 +1 @@ ---require source-map-support/register out/test \ No newline at end of file +--reporter=dot --require source-map-support/register out/test \ No newline at end of file