improve logging
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
module NpmtsDefault {
|
||||
export var init = function() {
|
||||
plugins.gulp.task("defaultTsd",function(cb){
|
||||
plugins.beautylog.log("now installing typings from" + " ts/tsd.json".blue);
|
||||
plugins.g.tsd({
|
||||
command: 'reinstall',
|
||||
config: paths.tsd
|
||||
@ -11,6 +12,7 @@ module NpmtsDefault {
|
||||
|
||||
|
||||
plugins.gulp.task("defaultIndexTS", function(){
|
||||
plugins.beautylog.log("now compiling" + " ts/index.ts".blue);
|
||||
var tsResult = plugins.gulp.src(paths.indexTS)
|
||||
.pipe(plugins.g.typescript({
|
||||
out:"index.js",
|
||||
@ -26,6 +28,7 @@ module NpmtsDefault {
|
||||
});
|
||||
|
||||
plugins.gulp.task("defaultTestTS", function(){
|
||||
plugins.beautylog.log("now compiling" + " ts/test.ts".blue);
|
||||
plugins.gulp.src(paths.testTS)
|
||||
.pipe(plugins.g.typescript({
|
||||
out: "test.js"
|
||||
@ -33,9 +36,13 @@ module NpmtsDefault {
|
||||
.pipe(plugins.gulp.dest(paths.cwd))
|
||||
});
|
||||
|
||||
plugins.gulp.task("defaultCleanup",function(cb){
|
||||
plugins.beautylog.success("TypeScript for this module compiled successfully.");
|
||||
cb();
|
||||
});
|
||||
|
||||
plugins.gulp.task("default",function(cb){
|
||||
plugins.g.sequence("defaultTsd","defaultIndexTS","defaultTestTS");
|
||||
plugins.beautylog.success("TypeScript for this module was compiled successfully.");
|
||||
plugins.g.sequence("defaultTsd","defaultIndexTS","defaultTestTS","defaultCleanup",cb);
|
||||
});
|
||||
|
||||
plugins.gulp.start.apply(plugins.gulp, ['default']);
|
||||
|
@ -3,6 +3,7 @@ module NpmtsPaths {
|
||||
export var init = function() {
|
||||
var paths:any = {};
|
||||
paths.cwd = plugins.smartcli.get.cwd().path;
|
||||
paths.tsd = plugins.path.join(paths.cwd,"ts/tsd.json");
|
||||
paths.indexTS = plugins.path.join(paths.cwd,"ts/index.ts");
|
||||
paths.testTS = plugins.path.join(paths.cwd,"ts/test.ts");
|
||||
return paths;
|
||||
|
Reference in New Issue
Block a user