update docs and comments, add servezone compatibility

This commit is contained in:
2016-09-04 13:42:22 +02:00
parent 66bef3cd60
commit 61ee70ea8d
24 changed files with 248 additions and 31 deletions

View File

@@ -5,8 +5,17 @@ import {bash} from "./npmci.bash";
import * as NpmciEnv from "./npmci.env";
import * as NpmciBuildDocker from "./npmci.build.docker"
export let publish = (serviceArg:string = "npm") => {
switch (serviceArg){
/**
* type of supported services
*/
export type registryService = "npm" | "docker";
/**
* the main exported publish function.
* @param registryServiceArg the serviceArg
*/
export let publish = (registryServiceArg:registryService = "npm") => {
switch (registryServiceArg){
case "npm":
return publishNpm();
case "docker":
@@ -14,6 +23,9 @@ export let publish = (serviceArg:string = "npm") => {
}
};
/**
* tries to publish project at cwd to npm
*/
let publishNpm = function(){
let done = plugins.q.defer();
prepare("npm")
@@ -25,6 +37,9 @@ let publishNpm = function(){
return done.promise;
}
/**
* tries to pubish current cwd to Docker registry
*/
let publishDocker = function(){
let done = plugins.q.defer();
NpmciBuildDocker.readDockerfiles()