start docker integration

This commit is contained in:
Phil Kunz
2016-07-18 20:48:34 +02:00
parent 030c3ec00d
commit c5413ca11d
16 changed files with 121 additions and 5 deletions

View File

@@ -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
View 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
View File

@@ -0,0 +1,3 @@
import * as plugins from "./npmdocker.plugins";
export let packageBase = plugins.path.join(__dirname,"../");

View File

@@ -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");

View 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;
}