Skip to content

Instantly share code, notes, and snippets.

@aikoven
Created October 6, 2015 17:35
Show Gist options
  • Save aikoven/44697d24ea92f5b1f326 to your computer and use it in GitHub Desktop.
Save aikoven/44697d24ea92f5b1f326 to your computer and use it in GitHub Desktop.
import gulp from 'gulp';
import ts from 'gulp-typescript';
import babel from 'gulp-babel';
import mocha from 'gulp-spawn-mocha';
gulp.task('build', () => {
return gulp.src(['typings/tsd.d.ts', 'src/**/*.ts', 'test/**/*.ts'])
.pipe(ts({
target: 'ES6',
outDir: 'build'
}))
.pipe(babel())
.pipe(gulp.dest('build'))
;
});
gulp.task('test', ['build'], () => {
return gulp.src('build/test/**/test_*.js', {read: false})
.pipe(mocha({
reporter: 'list',
require: ['babel-core/polyfill']
}));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment