2016-03-12 09:21:16 +00:00
|
|
|
"use strict";
|
2016-05-19 20:11:18 +00:00
|
|
|
/// <reference path="./typings/index.d.ts" />
|
2016-03-12 09:21:16 +00:00
|
|
|
var plugins = require("./npmts.plugins");
|
|
|
|
var paths = require("./npmts.paths");
|
2016-05-17 00:32:40 +00:00
|
|
|
var npmts_promisechain_1 = require("./npmts.promisechain");
|
2016-03-12 09:21:16 +00:00
|
|
|
exports.run = function (configArg) {
|
|
|
|
var config = configArg;
|
|
|
|
var done = plugins.Q.defer();
|
|
|
|
/* -------------------------------------------------
|
|
|
|
* ----------- install typings ---------------
|
|
|
|
* ----------------------------------------------- */
|
2016-05-19 22:55:14 +00:00
|
|
|
npmts_promisechain_1.npmtsOra.text("now installing " + "typings".yellow);
|
2016-03-20 18:09:58 +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;
|
|
|
|
};
|