tscoverage/ts/npmts.install.ts

19 lines
831 B
TypeScript
Raw Normal View History

2016-03-14 03:32:52 +00:00
/// <reference path="./typings/main.d.ts" />
2016-03-12 09:21:16 +00:00
import plugins = require("./npmts.plugins");
import paths = require("./npmts.paths");
export var run = function(configArg){
var config = configArg;
var done = plugins.Q.defer();
/* -------------------------------------------------
* ----------- install typings ---------------
* ----------------------------------------------- */
plugins.beautylog.log("now installing " + "typings".yellow);
2016-03-21 00:07:34 +00:00
var absoluteTypingsArray = plugins.smartpath.transform.toAbsolute(config.typings,paths.cwd);
2016-03-12 09:21:16 +00:00
plugins.gulp.src(absoluteTypingsArray)
.pipe(plugins.g.typings())
.pipe(plugins.g.gFunction(function(){
2016-03-14 03:53:35 +00:00
plugins.beautylog.ok("typings have been installed!");
2016-03-12 09:21:16 +00:00
done.resolve(config);
},"atEnd"));
return done.promise;
};