diff --git a/default_packages.json b/default_packages.json new file mode 100644 index 0000000..d90b8b3 --- /dev/null +++ b/default_packages.json @@ -0,0 +1,6 @@ +{ + "mandatory":[ + "typings", + "npm-check-updates" + ] +} \ No newline at end of file diff --git a/package.json b/package.json index e8c67a3..a7f14bf 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "node-g", + "name": "npmg", "version": "1.0.0", "description": "setup your environment with the most important tools and update them easily.", "main": "dist/index.js", @@ -21,5 +21,13 @@ "bugs": { "url": "https://github.com/GitZoneTools/node-g/issues" }, - "homepage": "https://github.com/GitZoneTools/node-g#readme" + "homepage": "https://github.com/GitZoneTools/node-g#readme", + "devDependencies": { + "npmts": "^3.3.2" + }, + "dependencies": { + "q": "^1.4.1", + "smartcli": "0.0.11", + "smartfile": "0.0.11" + } } diff --git a/ts/index.js b/ts/index.js new file mode 100644 index 0000000..97cd90e --- /dev/null +++ b/ts/index.js @@ -0,0 +1,2 @@ +var npmg = {}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/ts/index.js.map b/ts/index.js.map new file mode 100644 index 0000000..aa92184 --- /dev/null +++ b/ts/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAEA,IAAI,IAAI,GAAG,EAEV,CAAC"} \ No newline at end of file diff --git a/ts/index.ts b/ts/index.ts new file mode 100644 index 0000000..45c27e9 --- /dev/null +++ b/ts/index.ts @@ -0,0 +1,5 @@ +/// +import plugins = require("./npmg.plugins"); +let npmg = { + +}; \ No newline at end of file diff --git a/ts/npmg.cli.js b/ts/npmg.cli.js new file mode 100644 index 0000000..c652fdc --- /dev/null +++ b/ts/npmg.cli.js @@ -0,0 +1 @@ +//# sourceMappingURL=npmg.cli.js.map \ No newline at end of file diff --git a/ts/npmg.cli.js.map b/ts/npmg.cli.js.map new file mode 100644 index 0000000..7168f92 --- /dev/null +++ b/ts/npmg.cli.js.map @@ -0,0 +1 @@ +{"version":3,"file":"npmg.cli.js","sourceRoot":"","sources":["npmg.cli.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/ts/npmg.cli.ts b/ts/npmg.cli.ts new file mode 100644 index 0000000..e69de29 diff --git a/ts/npmg.install.js b/ts/npmg.install.js new file mode 100644 index 0000000..3f68fd0 --- /dev/null +++ b/ts/npmg.install.js @@ -0,0 +1,14 @@ +/// +var plugins = require("./npmg.plugins"); +var installExec = function (packageNames) { + for (var packageName in packageNames) { + plugins.shelljs.exec("npm install -g " + packageName); + } + ; +}; +var defaultPackages = plugins.smartfile.readFileToObject("../default_packages.json"); +var install = function () { + installExec(defaultPackages); +}; +module.exports = install; +//# sourceMappingURL=npmg.install.js.map \ No newline at end of file diff --git a/ts/npmg.install.js.map b/ts/npmg.install.js.map new file mode 100644 index 0000000..6b0eeaf --- /dev/null +++ b/ts/npmg.install.js.map @@ -0,0 +1 @@ +{"version":3,"file":"npmg.install.js","sourceRoot":"","sources":["npmg.install.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,IAAO,OAAO,WAAW,gBAAgB,CAAC,CAAC;AAC3C,IAAI,WAAW,GAAG,UAAS,YAAqB;IAC5C,GAAG,CAAC,CAAC,GAAG,CAAC,WAAW,IAAI,YAAY,CAAC,CAAA,CAAC;QAClC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,GAAG,WAAW,CAAC,CAAC;IAC1D,CAAC;IAAA,CAAC;AACN,CAAC,CAAC;AAEF,IAAI,eAAe,GAAG,OAAO,CAAC,SAAS,CAAC,gBAAgB,CAAC,0BAA0B,CAAC,CAAC;AAErF,IAAI,OAAO,GAAG;IACV,WAAW,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,iBAAS,OAAO,CAAC"} \ No newline at end of file diff --git a/ts/npmg.install.ts b/ts/npmg.install.ts new file mode 100644 index 0000000..c2df9c1 --- /dev/null +++ b/ts/npmg.install.ts @@ -0,0 +1,15 @@ +/// +import plugins = require("./npmg.plugins"); +let installExec = function(packageNames:string[]){ + for (let packageName in packageNames){ + plugins.shelljs.exec("npm install -g " + packageName); + }; +}; + +let defaultPackages = plugins.smartfile.readFileToObject("../default_packages.json"); + +let install = function(){ + installExec(defaultPackages); +}; + +export = install; \ No newline at end of file diff --git a/ts/npmg.paths.js b/ts/npmg.paths.js new file mode 100644 index 0000000..61d20c4 --- /dev/null +++ b/ts/npmg.paths.js @@ -0,0 +1 @@ +//# sourceMappingURL=npmg.paths.js.map \ No newline at end of file diff --git a/ts/npmg.paths.js.map b/ts/npmg.paths.js.map new file mode 100644 index 0000000..efae7ec --- /dev/null +++ b/ts/npmg.paths.js.map @@ -0,0 +1 @@ +{"version":3,"file":"npmg.paths.js","sourceRoot":"","sources":["npmg.paths.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/ts/npmg.paths.ts b/ts/npmg.paths.ts new file mode 100644 index 0000000..2cd5e54 --- /dev/null +++ b/ts/npmg.paths.ts @@ -0,0 +1,2 @@ +/// +import paths = require("./npmg.paths"); diff --git a/ts/npmg.plugins.js b/ts/npmg.plugins.js new file mode 100644 index 0000000..16cd9cd --- /dev/null +++ b/ts/npmg.plugins.js @@ -0,0 +1,4 @@ +/// +exports.shelljs = require("shelljs"); +exports.smartfile = require("smartfile"); +//# sourceMappingURL=npmg.plugins.js.map \ No newline at end of file diff --git a/ts/npmg.plugins.js.map b/ts/npmg.plugins.js.map new file mode 100644 index 0000000..c06c3c0 --- /dev/null +++ b/ts/npmg.plugins.js.map @@ -0,0 +1 @@ +{"version":3,"file":"npmg.plugins.js","sourceRoot":"","sources":["npmg.plugins.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC9B,eAAO,WAAW,SAAS,CAAC,CAAC;AAChC,iBAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC"} \ No newline at end of file diff --git a/ts/npmg.plugins.ts b/ts/npmg.plugins.ts new file mode 100644 index 0000000..457cb10 --- /dev/null +++ b/ts/npmg.plugins.ts @@ -0,0 +1,3 @@ +/// +export import shelljs = require("shelljs"); +export let smartfile = require("smartfile"); \ No newline at end of file diff --git a/ts/typings.json b/ts/typings.json new file mode 100644 index 0000000..b42a356 --- /dev/null +++ b/ts/typings.json @@ -0,0 +1,6 @@ +{ + "ambientDependencies": { + "node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts#48c1e3c1d6baefa4f1a126f188c27c4fefd36bff", + "shelljs": "github:DefinitelyTyped/DefinitelyTyped/shelljs/shelljs.d.ts#ce14ae27a020194da3d35aa3468ca1e9e5296316" + } +}