2015-11-15 19:35:13 +00:00
|
|
|
// import gulp
|
|
|
|
var gulp = require("gulp")
|
|
|
|
var gulpTypescript = require("gulp-typescript");
|
|
|
|
var pr = require("pushrocks");
|
|
|
|
|
|
|
|
gulp.task('compileTS', function() {
|
|
|
|
var stream = gulp.src('../index.ts')
|
|
|
|
.pipe(gulpTypescript({
|
|
|
|
out: "index.js"
|
|
|
|
}))
|
|
|
|
.pipe(gulp.dest("../../"));
|
|
|
|
return stream;
|
|
|
|
});
|
|
|
|
|
2015-11-16 00:40:23 +00:00
|
|
|
gulp.task('compileTSTest', function() {
|
|
|
|
var stream = gulp.src('../test.ts')
|
|
|
|
.pipe(gulpTypescript({
|
|
|
|
out: "test.js"
|
|
|
|
}))
|
|
|
|
.pipe(gulp.dest("../../"));
|
|
|
|
return stream;
|
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('default',['compileTS','compileTSTest'], function() {
|
2015-11-15 19:35:13 +00:00
|
|
|
pr.beautylog.success('Typescript compiled');
|
|
|
|
});
|
|
|
|
|
|
|
|
//lets tell gulp to start with the default task.
|
|
|
|
pr.beautylog.log('Starting Gulp to compile TypeScript');
|
|
|
|
gulp.start.apply(gulp, ['default']);
|