import * as gulp from 'gulp' ; import { Project } from "gulp-typescript" ; import * as gulpTypescript from 'gulp-typescript' ; import * as gulpSourcemaps from 'gulp-sourcemaps' ; import { ICompileStream } from "gulp-typescript/release/project" ; author CaMnter
  const mergeStream = require ( 'merge-stream' ) ; const tsProject = gulpTypescript . createProject ( 'tsconfig.json' ) ; gulp . task ( 'default' , ( ) => { const tsResult = gulp . src ( [ 'src/**/*.ts' ] ) . pipe ( gulpSourcemaps . init ( ) ) . pipe ( tsProject ( ) ) ; return mergeStream ( tsResult ) . pipe ( gulpSourcemaps . write ( '.' ) ) . pipe ( gulp . dest ( tsProject . options . outDir || 'es5' ) ) ; } ) ;