Skip to content

Commit

Permalink
add IGulpPlugin and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
progre committed Sep 27, 2014
1 parent 880c9e2 commit 501792e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 7 additions & 7 deletions gulp/gulp-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
4 changes: 4 additions & 0 deletions gulp/gulp.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,3 +282,7 @@ declare module "gulp" {
var _tmp:gulp.Gulp;
export = _tmp;
}

interface IGulpPlugin {
(...args: any[]): NodeJS.ReadWriteStream;
}

0 comments on commit 501792e

Please sign in to comment.