start work on smartdeploy package
This commit is contained in:
parent
97b58c3655
commit
9587dc7850
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,4 +1,7 @@
|
||||
.idea/
|
||||
coverage/
|
||||
docs/
|
||||
node_modules/
|
||||
node_modules/
|
||||
ts/typings/
|
||||
ts/**/*.js
|
||||
ts/**/*.js.map
|
4
dist/index.js
vendored
Normal file
4
dist/index.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
exports.check = require("./smartdeploy.check");
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFHYyxhQUFLLFdBQVcscUJBQXFCLENBQUMsQ0FBQyIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vLyA8cmVmZXJlbmNlIHBhdGggPVwiLi90eXBpbmdzL21haW4uZC50c1wiIC8+XG5pbXBvcnQgcGx1Z2lucyA9IHJlcXVpcmUoXCIuL3NtYXJ0ZGVwbG95LnBsdWdpbnNcIik7XG5cbmV4cG9ydCBpbXBvcnQgY2hlY2sgPSByZXF1aXJlKFwiLi9zbWFydGRlcGxveS5jaGVja1wiKTsiXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=
|
9
dist/smartdeploy.check.js
vendored
Normal file
9
dist/smartdeploy.check.js
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
/// <reference path ="./typings/main.d.ts" />
|
||||
var plugins = require("./smartdeploy.plugins");
|
||||
exports.dockerVersion = function () {
|
||||
var versionInfo = plugins.shelljs.exec("docker version").stdout;
|
||||
return versionInfo;
|
||||
};
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0ZGVwbG95LmNoZWNrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSw2Q0FBNkM7QUFDN0MsSUFBTyxPQUFPLFdBQVcsdUJBQXVCLENBQUMsQ0FBQztBQUd2QyxxQkFBYSxHQUFHO0lBQ3ZCLElBQUksV0FBVyxHQUFHLE9BQU8sQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLGdCQUFnQixDQUFDLENBQUMsTUFBTSxDQUFDO0lBQ2hFLE1BQU0sQ0FBQyxXQUFXLENBQUM7QUFDdkIsQ0FBQyxDQUFDIiwiZmlsZSI6InNtYXJ0ZGVwbG95LmNoZWNrLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aCA9XCIuL3R5cGluZ3MvbWFpbi5kLnRzXCIgLz5cbmltcG9ydCBwbHVnaW5zID0gcmVxdWlyZShcIi4vc21hcnRkZXBsb3kucGx1Z2luc1wiKTtcblxuXG5leHBvcnQgbGV0IGRvY2tlclZlcnNpb24gPSBmdW5jdGlvbigpe1xuICAgIGxldCB2ZXJzaW9uSW5mbyA9IHBsdWdpbnMuc2hlbGxqcy5leGVjKFwiZG9ja2VyIHZlcnNpb25cIikuc3Rkb3V0O1xuICAgIHJldHVybiB2ZXJzaW9uSW5mbztcbn07Il0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9
|
6
dist/smartdeploy.plugins.js
vendored
Normal file
6
dist/smartdeploy.plugins.js
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
/// <reference path ="./typings/main.d.ts" />
|
||||
exports.beautylog = require("beautylog");
|
||||
exports.shelljs = require("shelljs");
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0ZGVwbG95LnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDZDQUE2QztBQUNsQyxpQkFBUyxHQUFHLE9BQU8sQ0FBQyxXQUFXLENBQUMsQ0FBQztBQUNqQyxlQUFPLEdBQUcsT0FBTyxDQUFDLFNBQVMsQ0FBQyxDQUFDIiwiZmlsZSI6InNtYXJ0ZGVwbG95LnBsdWdpbnMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLy8gPHJlZmVyZW5jZSBwYXRoID1cIi4vdHlwaW5ncy9tYWluLmQudHNcIiAvPlxuZXhwb3J0IGxldCBiZWF1dHlsb2cgPSByZXF1aXJlKFwiYmVhdXR5bG9nXCIpO1xuZXhwb3J0IGxldCBzaGVsbGpzID0gcmVxdWlyZShcInNoZWxsanNcIik7Il0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9
|
10
package.json
10
package.json
@ -19,5 +19,13 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/pushrocks/smartdeploy/issues"
|
||||
},
|
||||
"homepage": "https://github.com/pushrocks/smartdeploy#readme"
|
||||
"homepage": "https://github.com/pushrocks/smartdeploy#readme",
|
||||
"devDependencies": {
|
||||
"npmts": "^5.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"beautylog": "^4.1.2",
|
||||
"shelljs": "^0.6.0",
|
||||
"smartfile": "^3.0.3"
|
||||
}
|
||||
}
|
||||
|
12
test/test.js
Normal file
12
test/test.js
Normal file
@ -0,0 +1,12 @@
|
||||
/// <reference path ="../ts/typings/main.d.ts" />
|
||||
var smartDeploy = require("../dist/index.js");
|
||||
describe("smartdeploy", function () {
|
||||
describe(".check", function () {
|
||||
describe(".docker()", function () {
|
||||
it("should display docker information", function () {
|
||||
smartDeploy.check.docker();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=test.js.map
|
1
test/test.js.map
Normal file
1
test/test.js.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,IAAI,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAG9C,QAAQ,CAAC,aAAa,EAAC;IACnB,QAAQ,CAAC,QAAQ,EAAC;QACd,QAAQ,CAAC,WAAW,EAAC;YACjB,EAAE,CAAC,mCAAmC,EAAC;gBACnC,WAAW,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;YAC/B,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AAEP,CAAC,CAAC,CAAC"}
|
14
test/test.ts
Normal file
14
test/test.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/// <reference path ="../ts/typings/main.d.ts" />
|
||||
let smartDeploy = require("../dist/index.js");
|
||||
|
||||
|
||||
describe("smartdeploy",function(){
|
||||
describe(".check",function(){
|
||||
describe(".docker()",function(){
|
||||
it("should display docker information",function(){
|
||||
smartDeploy.check.docker();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
4
ts/index.ts
Normal file
4
ts/index.ts
Normal file
@ -0,0 +1,4 @@
|
||||
/// <reference path ="./typings/main.d.ts" />
|
||||
import plugins = require("./smartdeploy.plugins");
|
||||
|
||||
export import check = require("./smartdeploy.check");
|
16
ts/smartdeploy.check.ts
Normal file
16
ts/smartdeploy.check.ts
Normal file
@ -0,0 +1,16 @@
|
||||
/// <reference path ="./typings/main.d.ts" />
|
||||
import plugins = require("./smartdeploy.plugins");
|
||||
|
||||
let dockerVersion = undefined;
|
||||
let parseDockerVersion = function(){
|
||||
if (typeof dockerVersion === "undefined") {
|
||||
dockerVersion = plugins.shelljs.exec("docker version").stdout;
|
||||
} else {
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
export let docker = function(){
|
||||
|
||||
};
|
||||
|
0
ts/smartdeploy.docker.ts
Normal file
0
ts/smartdeploy.docker.ts
Normal file
15
ts/smartdeploy.get.ts
Normal file
15
ts/smartdeploy.get.ts
Normal file
@ -0,0 +1,15 @@
|
||||
/// <reference path ="./typings/main.d.ts" />
|
||||
import plugins = require("./smartdeploy.plugins");
|
||||
|
||||
|
||||
let parseDockerVersion = function(){
|
||||
plugins.shelljs.exec("docker version").stdout;
|
||||
};
|
||||
|
||||
let dockerInfoObject = undefined;
|
||||
export let dockerInfo = function(){
|
||||
if (typeof dockerInfo === "undefined") {
|
||||
dockerInfoObject = parseDockerVersion();
|
||||
};
|
||||
return dockerInfoObject
|
||||
};
|
3
ts/smartdeploy.plugins.ts
Normal file
3
ts/smartdeploy.plugins.ts
Normal file
@ -0,0 +1,3 @@
|
||||
/// <reference path ="./typings/main.d.ts" />
|
||||
export let beautylog = require("beautylog");
|
||||
export let shelljs = require("shelljs");
|
10
ts/typings.json
Normal file
10
ts/typings.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"version": false,
|
||||
"dependencies": {},
|
||||
"ambientDependencies": {
|
||||
"colors": "registry:dt/colors#0.6.0-1+20160317120654",
|
||||
"mocha": "registry:dt/mocha#2.2.5+20160317120654",
|
||||
"node": "registry:dt/node#4.0.0+20160330064709",
|
||||
"should": "registry:dt/should#8.1.1+20160316155526"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user