tscoverage/compile/compile.js

25 lines
620 B
JavaScript
Raw Normal View History

2016-01-14 18:25:36 +00:00
// import gulp
var gulp = require("gulp");
var gulpTypescript = require("gulp-typescript");
2016-01-14 18:31:53 +00:00
var gulpInsert = require("gulp-insert");
2016-01-14 18:25:36 +00:00
var plugins = {
beautylog: require("beautylog")
};
plugins.beautylog.log('now compiling the mojo.io gulp tasks');
gulp.task('indexTS', function() {
var stream = gulp.src('../ts/index.ts')
2016-01-14 18:31:53 +00:00
.pipe(gulpTypescript({
out: "index.js"
}))
.pipe(gulpInsert.prepend('#!/usr/bin/env node\n\n'))
.pipe(gulp.dest("../"));
2016-01-14 18:25:36 +00:00
return stream;
});
gulp.task('default',['indexTS'], function() {
plugins.beautylog.success('Typescript compiled');
});
gulp.start.apply(gulp, ['default']);