diff --git a/gulp-core-build/src/GulpProxy.ts b/gulp-core-build/src/GulpProxy.ts index dd460d708a..e179786f98 100644 --- a/gulp-core-build/src/GulpProxy.ts +++ b/gulp-core-build/src/GulpProxy.ts @@ -1,29 +1,26 @@ import gulp = require('gulp'); +import Orchestrator = require('orchestrator'); /* tslint:disable:max-line-length */ -export class GulpProxy { +export class GulpProxy extends Orchestrator implements gulp.Gulp { + public src: gulp.SrcMethod; + public dest: gulp.DestMethod; + public watch: gulp.WatchMethod; + private _gulp: gulp.Gulp; constructor(gulpInstance: gulp.Gulp) { + super(); this._gulp = gulpInstance; + this.src = gulpInstance.src; + this.dest = gulpInstance.dest; + this.watch = gulpInstance.watch; } - public task(): void { + /* tslint:disable-next-line:no-any */ + public task(): any { throw new Error( 'You should not define gulp tasks, but instead subclass the GulpTask and override the executeTask method.' ); } - - public src(glob: string | string[], opt?: gulp.SrcOptions): NodeJS.ReadWriteStream { - return this._gulp.src(glob, opt); - } - - public dest(outFolder: string | ((file: string) => string), - opt?: gulp.DestOptions): NodeJS.ReadWriteStream { - return this._gulp.dest(outFolder, opt); - } - - public watch(glob: string | string[], fn: (gulp.WatchCallback | string)): NodeJS.EventEmitter { - return this._gulp.watch(glob, fn); - } }