23 lines
2.8 KiB
JavaScript
23 lines
2.8 KiB
JavaScript
/// <reference path="./typings/main.d.ts" />
|
|
var plugins = require("./npmg.plugins");
|
|
var paths = require("./npmg.paths");
|
|
var installExec = function (packageNames) {
|
|
for (var packageName in packageNames) {
|
|
plugins.shelljs.exec("npm install -g " + packageName);
|
|
}
|
|
;
|
|
};
|
|
var packageLibrary = plugins.smartfile.readFileToObject(plugins.path.join(paths.packageBase, "packageLibrary.json"));
|
|
var install = function (packageSetArg) {
|
|
switch (packageSetArg) {
|
|
case "default":
|
|
installExec(packageLibrary.default);
|
|
default:
|
|
plugins.beautylog.warn("no set has been specified");
|
|
}
|
|
installExec(packageLibrary.default);
|
|
};
|
|
module.exports = install;
|
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWcuaW5zdGFsbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSw0Q0FBNEM7QUFDNUMsSUFBTyxPQUFPLFdBQVcsZ0JBQWdCLENBQUMsQ0FBQztBQUMzQyxJQUFPLEtBQUssV0FBVyxjQUFjLENBQUMsQ0FBQztBQUN2QyxJQUFJLFdBQVcsR0FBRyxVQUFTLFlBQXFCO0lBQzVDLEdBQUcsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxXQUFXLElBQUksWUFBWSxDQUFDLENBQUEsQ0FBQztRQUNsQyxPQUFPLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxpQkFBaUIsR0FBRyxXQUFXLENBQUMsQ0FBQztJQUMxRCxDQUFDO0lBQUEsQ0FBQztBQUNOLENBQUMsQ0FBQztBQUVGLElBQUksY0FBYyxHQUFHLE9BQU8sQ0FBQyxTQUFTLENBQUMsZ0JBQWdCLENBQ25ELE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxXQUFXLEVBQUMscUJBQXFCLENBQUMsQ0FDN0QsQ0FBQztBQUVGLElBQ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