TypeScript/gulpfile.js
2015-05-06 20:55:31 +08:00

22 lines
516 B
JavaScript

var gulp = require('gulp'),
ts = require('gulp-typescript');
gulp.task('typescript', function() {
var tsResult = gulp.src('ts/**/*.ts')
.pipe(ts({
target: 'ES5',
declarationFiles: false,
noExternalResolve: true
}));
tsResult.dts.pipe(gulp.dest('dist/tsdefinitions'));
return tsResult.js.pipe(gulp.dest('dist/typescript'));
});
gulp.task('watch', function() {
gulp.watch(['ts/**/*.ts'], ['typescript']);
});
gulp.task('default', ['typescript', 'watch']);