start docker integration
This commit is contained in:
12
ts/index.ts
12
ts/index.ts
@@ -0,0 +1,12 @@
|
||||
import * as plugins from "./npmdocker.plugins";
|
||||
import * as paths from "./npmdocker.paths";
|
||||
import * as docker from "./npmdocker.docker";
|
||||
import {promisechain} from "./npmdocker.promisechain";
|
||||
|
||||
let config = plugins.npmextra.dataFor({
|
||||
toolName:"npmdocker",
|
||||
defaultSettings: {},
|
||||
cwd: ""
|
||||
});
|
||||
|
||||
|
||||
|
17
ts/npmdocker.docker.ts
Normal file
17
ts/npmdocker.docker.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import * as plugins from "./npmdocker.plugins";
|
||||
import * as paths from "./npmdocker.paths";
|
||||
|
||||
/**
|
||||
* check if docker is available
|
||||
*/
|
||||
export let checkDocker = () => {
|
||||
let done = plugins.q.defer();
|
||||
if(plugins.shelljs.which("docker")){
|
||||
done.resolve();
|
||||
} else {
|
||||
done.reject(new Error("docker not found on this machine"));
|
||||
}
|
||||
return done.promise;
|
||||
};
|
||||
|
||||
export let makeDockerReady = () => {};
|
3
ts/npmdocker.paths.ts
Normal file
3
ts/npmdocker.paths.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import * as plugins from "./npmdocker.plugins";
|
||||
|
||||
export let packageBase = plugins.path.join(__dirname,"../");
|
@@ -0,0 +1,7 @@
|
||||
import "typings-global";
|
||||
export import beautylog = require("beautylog");
|
||||
export import npmextra = require("npmextra");
|
||||
export import path = require("path");
|
||||
export import q = require("q");
|
||||
export let shelljs = require("shelljs");
|
||||
export import smartfile = require("smartfile");
|
8
ts/npmdocker.promisechain.ts
Normal file
8
ts/npmdocker.promisechain.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import * as plugins from "./npmdocker.plugins";
|
||||
import * as paths from "./npmdocker.paths";
|
||||
import * as docker from "./npmdocker.docker";
|
||||
|
||||
export let promisechain = () => {
|
||||
let done = plugins.q.defer();
|
||||
return done.promise;
|
||||
}
|
Reference in New Issue
Block a user