2015-10-04 21:21:10 +00:00
|
|
|
// import gulp
|
|
|
|
var gulp = require("gulp"),
|
|
|
|
gulpTypescript = require("gulp-typescript");
|
|
|
|
|
|
|
|
gulp.task('compileTS', function() {
|
|
|
|
var stream = gulp.src('../index.ts')
|
|
|
|
.pipe(gulpTypescript({
|
|
|
|
out: "index.js"
|
|
|
|
}))
|
|
|
|
.pipe(gulp.dest("../../"));
|
|
|
|
return stream;
|
|
|
|
});
|
|
|
|
|
2015-10-05 21:33:57 +00:00
|
|
|
gulp.task('compileTestTS', function() {
|
|
|
|
var stream = gulp.src('../test.ts')
|
|
|
|
.pipe(gulpTypescript({
|
|
|
|
out: "test.js"
|
|
|
|
}))
|
|
|
|
.pipe(gulp.dest("../../"));
|
|
|
|
return stream;
|
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('default',['compileTS','compileTestTS'], function() {
|
2015-10-04 21:21:10 +00:00
|
|
|
console.log('Typescript compiled');
|
2015-11-09 03:07:01 +00:00
|
|
|
});
|
|
|
|
gulp.start.apply(gulp, ['default']);
|