1 | var gulp = require('gulp');
|
2 | var tsc = require('gulp-tsc');
|
3 |
|
4 | gulp.task('default', ['compile', 'watch']);
|
5 |
|
6 | gulp.task('watch', function () {
|
7 | gulp.watch('src/**/*.ts', ['compile']);
|
8 | });
|
9 |
|
10 | gulp.task('compile', function () {
|
11 | return gulp.src('src/**/*.ts')
|
12 | .pipe(tsc({
|
13 | emitError:false,
|
14 | module: 'commonjs',
|
15 | target: 'ES5',
|
16 | declaration: true
|
17 | }))
|
18 | .pipe(gulp.dest('build'));
|
19 | });
|