npmci/dist/npmci.command.js

20 lines
2.2 KiB
JavaScript
Raw Normal View History

2016-06-11 18:22:00 +00:00
"use strict";
require("typings-global");
var plugins = require("./npmci.plugins");
2016-06-11 19:01:44 +00:00
var npmci_bash_1 = require("./npmci.bash");
2016-06-11 18:44:56 +00:00
exports.command = function () {
2016-06-11 18:22:00 +00:00
var done = plugins.q.defer();
2016-06-11 19:01:44 +00:00
var wrappedCommand = "";
var argvArray = process.argv;
for (var i = 3; i < argvArray.length; i++) {
wrappedCommand = wrappedCommand + argvArray[i];
if (i + 1 != argvArray.length)
wrappedCommand = wrappedCommand + " ";
2016-06-11 19:01:44 +00:00
}
npmci_bash_1.bash(wrappedCommand);
2016-06-11 18:22:00 +00:00
done.resolve();
return done.promise;
};
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLmNvbW1hbmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUN4QixJQUFZLE9BQU8sV0FBTSxpQkFBaUIsQ0FBQyxDQUFBO0FBQzNDLDJCQUFtQixjQUFjLENBQUMsQ0FBQTtBQUV2QixlQUFPLEdBQUc7SUFDakIsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQTtJQUM1QixJQUFJLGNBQWMsR0FBVSxFQUFFLENBQUM7SUFDL0IsSUFBSSxTQUFTLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQztJQUM3QixHQUFHLENBQUEsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLFNBQVMsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxFQUFFLEVBQUMsQ0FBQztRQUN0QyxjQUFjLEdBQUcsY0FBYyxHQUFHLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUMvQyxFQU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