smartenv/ts/compile/compile.js
Philipp Kunz 5a45aa5fbe initial
2015-11-26 06:31:31 +01:00

28 lines
631 B
JavaScript

// import gulp
var gulp = require("gulp");
var gulpTypescript = require("gulp-typescript");
var bl = require("beautylog")("os");
gulp.task('compileTS', function() {
var stream = gulp.src('../index.ts')
.pipe(gulpTypescript({
out: "index.js"
}))
.pipe(gulp.dest("../../"));
return stream;
});
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() {
bl.success('Typescript compiled');
});
gulp.start.apply(gulp, ['default']);