From 501792ee1374ebda22da12e035e1d46c1304c221 Mon Sep 17 00:00:00 2001 From: progre Date: Sat, 27 Sep 2014 11:57:45 +0900 Subject: [PATCH] add IGulpPlugin and fix tests --- gulp/gulp-tests.ts | 14 +++++++------- gulp/gulp.d.ts | 4 ++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/gulp/gulp-tests.ts b/gulp/gulp-tests.ts index 0ba2d93d8eecf3..7e07f25f706d1b 100644 --- a/gulp/gulp-tests.ts +++ b/gulp/gulp-tests.ts @@ -2,28 +2,28 @@ import gulp = require("gulp"); -var typescript: any = null; // this would be the TypeScript compiler -var jasmine: any = null; // this would be the jasmine test runner +var typescript: IGulpPlugin = null; // this would be the TypeScript compiler +var jasmine: IGulpPlugin = null; // this would be the jasmine test runner gulp.task('compile', function() { gulp.src("**/*.ts") - .pipe(typescript) - .dest('out') + .pipe(typescript()) + .pipe(gulp.dest('out')) }); gulp.task('compile2', function(callback: (err?: any) => void) { gulp.src("**/*.ts") - .pipe(typescript) - .dest('out') + .pipe(typescript()) + .pipe(gulp.dest('out')) .on('end', callback); }); gulp.task('test', ['compile', 'compile2'], function() { gulp.src("out/test/**/*.js") - .pipe(jasmine); + .pipe(jasmine()); }); gulp.task('default', ['compile', 'test']); diff --git a/gulp/gulp.d.ts b/gulp/gulp.d.ts index 25aa16337245f4..7ec11def7e7d7a 100644 --- a/gulp/gulp.d.ts +++ b/gulp/gulp.d.ts @@ -282,3 +282,7 @@ declare module "gulp" { var _tmp:gulp.Gulp; export = _tmp; } + +interface IGulpPlugin { + (...args: any[]): NodeJS.ReadWriteStream; +}