tscoverage/ts/npmts.default.ts

35 lines
1.1 KiB
TypeScript
Raw Normal View History

2016-01-16 13:33:09 +00:00
/// <reference path="./index.ts" />
module NpmtsDefault {
export var init = function() {
plugins.gulp.task("indexTS", function(){
2016-01-18 14:15:15 +00:00
var tsResult = plugins.gulp.src(paths.indexTS)
.pipe(plugins.g.typescript({
out:"index.js",
declaration:true
}));
return plugins.mergeStream([
tsResult.dts.pipe(plugins.gulp.dest(paths.cwd)),
tsResult.js
.pipe(plugins.g.insert.prepend('#!/usr/bin/env node\n\n'))
.pipe(plugins.gulp.dest(paths.cwd))
]);
2016-01-16 13:33:09 +00:00
});
plugins.gulp.task("testTS", function(){
plugins.gulp.src(paths.testTS)
2016-01-18 14:15:15 +00:00
.pipe(plugins.g.typescript({
2016-01-16 13:33:09 +00:00
out: "test.js"
}))
.pipe(plugins.gulp.dest(paths.cwd))
});
plugins.gulp.task("default",["indexTS","testTS"],function(){
plugins.beautylog.success("TypeScript for this module was compiled successfully.");
});
plugins.gulp.start.apply(plugins.gulp, ['default']);
}
}