add structure
This commit is contained in:
parent
9c2b94da9d
commit
e6596e938a
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"mandatory":[
|
|
||||||
"typings",
|
|
||||||
"npm-check-updates"
|
|
||||||
]
|
|
||||||
}
|
|
7
dist/index.js
vendored
Normal file
7
dist/index.js
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
var install = require("./npmg.install");
|
||||||
|
var npmg = {
|
||||||
|
install: install
|
||||||
|
};
|
||||||
|
module.exports = npmg;
|
||||||
|
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLElBQU8sT0FBTyxXQUFXLGdCQUFnQixDQUFDLENBQUM7QUFDM0MsSUFBSSxJQUFJLEdBQUc7SUFDUCxPQUFPLEVBQUUsT0FBTztDQUNuQixDQUFDO0FBQ0YsaUJBQVMsSUFBSSxDQUFDIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4vdHlwaW5ncy9tYWluLmQudHNcIiAvPlxuaW1wb3J0IHBsdWdpbnMgPSByZXF1aXJlKFwiLi9ucG1nLnBsdWdpbnNcIik7XG5pbXBvcnQgaW5zdGFsbCA9IHJlcXVpcmUoXCIuL25wbWcuaW5zdGFsbFwiKTtcbmxldCBucG1nID0ge1xuICAgIGluc3RhbGw6IGluc3RhbGxcbn07XG5leHBvcnQgPSBucG1nOyJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ==
|
3
dist/npmg.cli.js
vendored
Normal file
3
dist/npmg.cli.js
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJucG1nLmNsaS5qcyIsInNvdXJjZXNDb250ZW50IjpbXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=
|
22
dist/npmg.install.js
vendored
Normal file
22
dist/npmg.install.js
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/// <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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWcuaW5zdGFsbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSw0Q0FBNEM7QUFDNUMsSUFBTyxPQUFPLFdBQVcsZ0JBQWdCLENBQUMsQ0FBQztBQUMzQyxJQUFPLEtBQUssV0FBVyxjQUFjLENBQUMsQ0FBQztBQUN2QyxJQUFJLFdBQVcsR0FBRyxVQUFTLFlBQXFCO0lBQzVDLEdBQUcsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxXQUFXLElBQUksWUFBWSxDQUFDLENBQUEsQ0FBQztRQUNsQyxPQUFPLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxpQkFBaUIsR0FBRyxXQUFXLENBQUMsQ0FBQztJQUMxRCxDQUFDO0lBQUEsQ0FBQ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BwbHVnaW5zLnNtYXJ0ZmlsZS5yZWFkRmlsZVRvT2JqZWN0KFxuICAgIHBsdWdpbnMucGF0aC5qb2luKHBhdGhzLnBhY2thZ2VCYXNlLFwicGFja2FnZUxpYnJhcnkuanNvblwiKVxuKTtcblxubGV0IGluc3RhbGwgPSBmdW5jdGlvbihwYWNrYWdlU2V0QXJnOlN0cmluZyl7XG4gICAgc3dpdGNoIChwYWNrYWdlU2V0QXJnKXtcbiAgICAgICAgY2FzZSBcImRlZmF1bHRcIjpcbiAgICAgICAgICAgIGluc3RhbGxFeGVjKHBhY2thZ2VMaWJyYXJ5LmRlZmF1bHQpO1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgcGx1Z2lucy5iZWF1dHlsb2cud2FybihcIm5vIHNldCBoYXMgYmVlbiBzcGVjaWZpZWRcIik7XG4gICAgfVxuICAgIGluc3RhbGxFeGVjKHBhY2thZ2VMaWJyYXJ5LmRlZmF1bHQpO1xufTtcblxuZXhwb3J0ID0gaW5zdGFsbDsiXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=
|
8
dist/npmg.paths.js
vendored
Normal file
8
dist/npmg.paths.js
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/// <reference path="./typings/main.d.ts" />
|
||||||
|
var plugins = require("./npmg.plugins");
|
||||||
|
var paths = {
|
||||||
|
packageBase: plugins.path.join("__dirname", "../")
|
||||||
|
};
|
||||||
|
module.exports = paths;
|
||||||
|
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWcucGF0aHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsNENBQTRDO0FBQzVDLElBQU8sT0FBTyxXQUFXLGdCQUFnQixDQUFDLENBQUM7QUFDM0MsSUFBSSxLQUFLLEdBQUc7SUFDUixXQUFXLEVBQUUsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxFQUFDLEtBQUssQ0FBQztDQUNwRCxDQUFBO0FBQ0QsaUJBQVMsS0FBSyxDQUFDIiwiZmlsZSI6Im5wbWcucGF0aHMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi90eXBpbmdzL21haW4uZC50c1wiIC8+XG5pbXBvcnQgcGx1Z2lucyA9IHJlcXVpcmUoXCIuL25wbWcucGx1Z2luc1wiKTtcbmxldCBwYXRocyA9IHtcbiAgICBwYWNrYWdlQmFzZTogcGx1Z2lucy5wYXRoLmpvaW4oXCJfX2Rpcm5hbWVcIixcIi4uL1wiKVxufVxuZXhwb3J0ID0gcGF0aHM7Il0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9
|
7
dist/npmg.plugins.js
vendored
Normal file
7
dist/npmg.plugins.js
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/// <reference path="./typings/main.d.ts" />
|
||||||
|
exports.beautylog = require("beautylog");
|
||||||
|
exports.path = require("path");
|
||||||
|
exports.shelljs = require("shelljs");
|
||||||
|
exports.smartfile = require("smartfile");
|
||||||
|
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWcucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSw0Q0FBNEM7QUFDakMsaUJBQVMsR0FBRyxPQUFPLENBQUMsV0FBVyxDQUFDLENBQUM7QUFDakMsWUFBSSxHQUFHLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FBQztBQUNwQixlQUFPLFdBQVcsU0FBUyxDQUFDLENBQUM7QUFDaEMsaUJBQVMsR0FBRyxPQUFPLENBQUMsV0FBVyxDQUFDLENBQUMiLCJmaWxlIjoibnBtZy5wbHVnaW5zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4vdHlwaW5ncy9tYWluLmQudHNcIiAvPlxuZXhwb3J0IGxldCBiZWF1dHlsb2cgPSByZXF1aXJlKFwiYmVhdXR5bG9nXCIpO1xuZXhwb3J0IGxldCBwYXRoID0gcmVxdWlyZShcInBhdGhcIik7XG5leHBvcnQgaW1wb3J0IHNoZWxsanMgPSByZXF1aXJlKFwic2hlbGxqc1wiKTtcbmV4cG9ydCBsZXQgc21hcnRmaWxlID0gcmVxdWlyZShcInNtYXJ0ZmlsZVwiKTtcbiJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ==
|
4
npmts.json
Normal file
4
npmts.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mode": "default",
|
||||||
|
"coveralls": true
|
||||||
|
}
|
@ -26,6 +26,7 @@
|
|||||||
"npmts": "^3.3.2"
|
"npmts": "^3.3.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"beautylog": "^3.1.2",
|
||||||
"q": "^1.4.1",
|
"q": "^1.4.1",
|
||||||
"smartcli": "0.0.11",
|
"smartcli": "0.0.11",
|
||||||
"smartfile": "0.0.11"
|
"smartfile": "0.0.11"
|
||||||
|
7
packageLibrary.json
Normal file
7
packageLibrary.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"default":[
|
||||||
|
"cash",
|
||||||
|
"npm-check-updates",
|
||||||
|
"typings"
|
||||||
|
]
|
||||||
|
}
|
3
test/test.js
Normal file
3
test/test.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJ0ZXN0LmpzIiwic291cmNlc0NvbnRlbnQiOltdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ==
|
0
test/test.ts
Normal file
0
test/test.ts
Normal file
@ -1,5 +1,7 @@
|
|||||||
/// <reference path="./typings/main.d.ts" />
|
/// <reference path="./typings/main.d.ts" />
|
||||||
import plugins = require("./npmg.plugins");
|
import plugins = require("./npmg.plugins");
|
||||||
|
import install = require("./npmg.install");
|
||||||
let npmg = {
|
let npmg = {
|
||||||
|
install: install
|
||||||
};
|
};
|
||||||
|
export = npmg;
|
@ -1,15 +1,24 @@
|
|||||||
/// <reference path="./typings/main.d.ts" />
|
/// <reference path="./typings/main.d.ts" />
|
||||||
import plugins = require("./npmg.plugins");
|
import plugins = require("./npmg.plugins");
|
||||||
|
import paths = require("./npmg.paths");
|
||||||
let installExec = function(packageNames:string[]){
|
let installExec = function(packageNames:string[]){
|
||||||
for (let packageName in packageNames){
|
for (let packageName in packageNames){
|
||||||
plugins.shelljs.exec("npm install -g " + packageName);
|
plugins.shelljs.exec("npm install -g " + packageName);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
let defaultPackages = plugins.smartfile.readFileToObject("../default_packages.json");
|
let packageLibrary = plugins.smartfile.readFileToObject(
|
||||||
|
plugins.path.join(paths.packageBase,"packageLibrary.json")
|
||||||
|
);
|
||||||
|
|
||||||
let install = function(){
|
let install = function(packageSetArg:String){
|
||||||
installExec(defaultPackages);
|
switch (packageSetArg){
|
||||||
|
case "default":
|
||||||
|
installExec(packageLibrary.default);
|
||||||
|
default:
|
||||||
|
plugins.beautylog.warn("no set has been specified");
|
||||||
|
}
|
||||||
|
installExec(packageLibrary.default);
|
||||||
};
|
};
|
||||||
|
|
||||||
export = install;
|
export = install;
|
@ -1,2 +1,6 @@
|
|||||||
/// <reference path="./typings/main.d.ts" />
|
/// <reference path="./typings/main.d.ts" />
|
||||||
import paths = require("./npmg.paths");
|
import plugins = require("./npmg.plugins");
|
||||||
|
let paths = {
|
||||||
|
packageBase: plugins.path.join("__dirname","../")
|
||||||
|
}
|
||||||
|
export = paths;
|
@ -1,3 +1,5 @@
|
|||||||
/// <reference path="./typings/main.d.ts" />
|
/// <reference path="./typings/main.d.ts" />
|
||||||
|
export let beautylog = require("beautylog");
|
||||||
|
export let path = require("path");
|
||||||
export import shelljs = require("shelljs");
|
export import shelljs = require("shelljs");
|
||||||
export let smartfile = require("smartfile");
|
export let smartfile = require("smartfile");
|
||||||
|
Loading…
Reference in New Issue
Block a user