TypeScript/gulpfile.js

22 lines
516 B
TypeScript
Raw Normal View History

2015-04-10 16:05:54 +08:00
var gulp = require('gulp'),
ts = require('gulp-typescript');
gulp.task('typescript', function() {
2015-05-06 20:55:31 +08:00
var tsResult = gulp.src('ts/**/*.ts')
2015-04-10 16:05:54 +08:00
.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() {
2015-05-06 20:55:31 +08:00
gulp.watch(['ts/**/*.ts'], ['typescript']);
2015-04-10 16:05:54 +08:00
});
gulp.task('default', ['typescript', 'watch']);