2016-05-19 20:11:18 +00:00
|
|
|
/// <reference path="./typings/index.d.ts" />
|
2016-03-12 09:21:16 +00:00
|
|
|
import plugins = require("./npmts.plugins");
|
|
|
|
import paths = require("./npmts.paths");
|
2016-05-17 00:32:40 +00:00
|
|
|
import {npmtsOra} from "./npmts.promisechain";
|
|
|
|
|
2016-03-12 09:21:16 +00:00
|
|
|
export var run = function(configArg){
|
|
|
|
var config = configArg;
|
|
|
|
var done = plugins.Q.defer();
|
|
|
|
/* -------------------------------------------------
|
|
|
|
* ----------- install typings ---------------
|
|
|
|
* ----------------------------------------------- */
|
2016-05-19 22:55:14 +00:00
|
|
|
npmtsOra.text("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-05-17 00:32:40 +00:00
|
|
|
plugins.beautylog.ok("typings installed!");
|
2016-03-12 09:21:16 +00:00
|
|
|
done.resolve(config);
|
|
|
|
},"atEnd"));
|
|
|
|
return done.promise;
|
|
|
|
};
|