update docs and comments, add servezone compatibility
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user