add IGulpPlugin and fix tests

This commit is contained in:
progre 2014-09-27 11:57:45 +09:00
parent 880c9e258b
commit 501792ee13
2 changed files with 11 additions and 7 deletions

View File

@ -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
gulp/gulp.d.ts vendored
View File

@ -282,3 +282,7 @@ declare module "gulp" {
var _tmp:gulp.Gulp;
export = _tmp;
}
interface IGulpPlugin {
(...args: any[]): NodeJS.ReadWriteStream;
}