add isC9 to env

This commit is contained in:
2016-03-03 01:50:13 +01:00
parent cd0b8f18af
commit a1d5b4fc4e
47 changed files with 130561 additions and 16 deletions

View File

@ -17,11 +17,7 @@ export var getUserAgentString = function():string{
};
export var isNode = function():boolean {
if (getEnvString() === "node"){
return true;
} else {
return false;
}
return getEnvString() === "node"
};
export var getNodeVersion = function():string {
@ -40,6 +36,14 @@ export var isCI = function(){
};
};
export var isC9 = function(){
if (process.env.C9_HOSTNAME){
return true;
} else {
return false;
}
};
export var isTravis = function(){
if(process.env.TRAVIS){
return true;

View File

@ -9,6 +9,7 @@ export class Environment {
nodeVersion:string;
isCI:boolean;
isTravis:boolean;
isC9:boolean;
constructor() {
this.runtimeEnv = helpers.getEnvString();
this.isBrowser = helpers.isBrowser();
@ -17,5 +18,6 @@ export class Environment {
this.nodeVersion = helpers.getNodeVersion();
this.isCI = helpers.isCI();
this.isTravis = helpers.isTravis();
this.isC9 = helpers.isC9();
};
}