tscoverage/dist/npmts.install.js

22 lines
882 B
JavaScript
Raw Normal View History

2016-03-12 10:21:16 +01:00
"use strict";
2016-03-14 04:32:52 +01:00
/// <reference path="./typings/main.d.ts" />
2016-03-12 10:21:16 +01:00
var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths");
2016-05-17 02:32:40 +02:00
var npmts_promisechain_1 = require("./npmts.promisechain");
2016-03-12 10:21:16 +01:00
exports.run = function (configArg) {
var config = configArg;
var done = plugins.Q.defer();
/* -------------------------------------------------
* ----------- install typings ---------------
* ----------------------------------------------- */
2016-05-17 02:32:40 +02:00
npmts_promisechain_1.npmtsOra.text("now installing typings");
2016-03-20 19:09:58 +01:00
var absoluteTypingsArray = plugins.smartpath.transform.toAbsolute(config.typings, paths.cwd);
2016-03-12 10:21:16 +01:00
plugins.gulp.src(absoluteTypingsArray)
.pipe(plugins.g.typings())
.pipe(plugins.g.gFunction(function () {
2016-05-17 02:32:40 +02:00
plugins.beautylog.ok("typings installed!");
2016-03-12 10:21:16 +01:00
done.resolve(config);
}, "atEnd"));
return done.promise;
};