resolve dependency loop
This commit is contained in:
@ -27,13 +27,13 @@ export var getEnv = function(){
|
||||
*/
|
||||
export var printEnv = function() {
|
||||
if (this.getEnv().isNode) {
|
||||
plugins.beautylog.ok("running on NODE");
|
||||
console.log("running on NODE");
|
||||
var smartenvVersion = require("../package.json").version;
|
||||
plugins.beautylog.log("node version is " + this.getEnv().nodeVersion + " and smartenv version is " + smartenvVersion);
|
||||
console.log("node version is " + this.getEnv().nodeVersion + " and smartenv version is " + smartenvVersion);
|
||||
} else {
|
||||
plugins.beautylog.ok("running on BROWSER");
|
||||
plugins.beautylog.log("browser is " + this.getEnv().userAgent);
|
||||
console.log("running on BROWSER");
|
||||
console.log("browser is " + this.getEnv().userAgent);
|
||||
}
|
||||
plugins.beautylog.log("the smartenv registration store currently holds the following properties:");
|
||||
console.log("the smartenv registration store currently holds the following properties:");
|
||||
console.log(Object.getOwnPropertyNames(objectStorage.obs.getAll()));
|
||||
};
|
@ -1,19 +1,19 @@
|
||||
/// <reference path="typings/main.d.ts" />
|
||||
import plugins = require("./smartenv.plugins");
|
||||
|
||||
var beautylog = require("beautylog");
|
||||
export var obs:any = {
|
||||
add: function(paramNameArg = "undefined",objectArg = "undefined") {
|
||||
if (paramNameArg == "undefined"){
|
||||
plugins.beautylog.error("paramName is undefined");
|
||||
beautylog.error("paramName is undefined");
|
||||
return;
|
||||
}
|
||||
if (objectArg == "undefined"){
|
||||
plugins.beautylog.error("objectArg is undefined");
|
||||
beautylog.error("objectArg is undefined");
|
||||
}
|
||||
if (typeof obsItems[paramNameArg] === "undefined"){
|
||||
obsItems[paramNameArg] = objectArg;
|
||||
} else {
|
||||
plugins.beautylog.error("object is already present, so add operation has failed.");
|
||||
beautylog.error("object is already present, so add operation has failed.");
|
||||
}
|
||||
return obsItems[paramNameArg];
|
||||
},
|
||||
@ -24,7 +24,7 @@ export var obs:any = {
|
||||
if(!(typeof obsItems[paramNameArg] === "undefined")){
|
||||
obsItems[paramNameArg] = plugins._.assign(obsItems[paramNameArg],objectArg);
|
||||
} else {
|
||||
plugins.beautylog.error("object is not present, so there is nothing to merge");
|
||||
beautylog.error("object is not present, so there is nothing to merge");
|
||||
}
|
||||
},
|
||||
get: function(keyName) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
/// <reference path="typings/main.d.ts" />
|
||||
var plugins = {
|
||||
beautylog: require("beautylog"),
|
||||
Q: require("q"),
|
||||
_: require("lodash")
|
||||
};
|
||||
|
Reference in New Issue
Block a user