tscoverage/dist/npmts.install.js

22 lines
882 B
JavaScript
Raw Normal View History

2016-03-12 09:21:16 +00:00
"use strict";
2016-03-14 03:32:52 +00:00
/// <reference path="./typings/main.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-17 00:32:40 +00:00
npmts_promisechain_1.npmtsOra.text("now installing typings");
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;
};