smartenv.exportEnv and smartenv.importEnv added
This commit is contained in:
parent
f994c34bc7
commit
0f784e2d74
4
index.js
4
index.js
@ -28,4 +28,8 @@ smartenv.register = function (objectArg, paramName) {
|
|||||||
smartenv.get = function (keyName) {
|
smartenv.get = function (keyName) {
|
||||||
return smartenv.items[keyName];
|
return smartenv.items[keyName];
|
||||||
};
|
};
|
||||||
|
smartenv.exportEnv = function () {
|
||||||
|
};
|
||||||
|
smartenv.importEnv = function () {
|
||||||
|
};
|
||||||
module.exports = smartenv;
|
module.exports = smartenv;
|
||||||
|
3
test.js
3
test.js
@ -9,4 +9,7 @@ smartenv.info.print();
|
|||||||
beautylog.log(smartenv.get("docit").key1);
|
beautylog.log(smartenv.get("docit").key1);
|
||||||
smartenv.makeGlobal();
|
smartenv.makeGlobal();
|
||||||
beautylog.log(global.smartenv.get("docit").key1);
|
beautylog.log(global.smartenv.get("docit").key1);
|
||||||
|
var key2 = "hello";
|
||||||
|
smartenv.get("docit").key2 = key2;
|
||||||
|
beautylog.log(global.smartenv.get("docit").key2);
|
||||||
beautylog.success("Success!");
|
beautylog.success("Success!");
|
||||||
|
@ -28,5 +28,9 @@ smartenv.register = function (objectArg, paramName) {
|
|||||||
smartenv.get = function (keyName) {
|
smartenv.get = function (keyName) {
|
||||||
return smartenv.items[keyName];
|
return smartenv.items[keyName];
|
||||||
};
|
};
|
||||||
|
smartenv.exportEnv = function () {
|
||||||
|
};
|
||||||
|
smartenv.importEnv = function () {
|
||||||
|
};
|
||||||
module.exports = smartenv;
|
module.exports = smartenv;
|
||||||
//# sourceMappingURL=index.js.map
|
//# sourceMappingURL=index.js.map
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,IAAI,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3C,IAAI,WAAW,GAAG,UAAS,SAAS,EAAC,SAAS;IAC1C,MAAM,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GAAG,UAAS,SAAS,EAAC,SAAuB;IAAvB,yBAAuB,GAAvB,uBAAuB;IAC1D,EAAE,CAAC,CAAC,SAAS,IAAI,WAAW,CAAC,CAAA,CAAC;QAC1B,SAAS,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC1C,MAAM,CAAC;IACX,CAAC;IACD,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AAC1C,CAAC,CAAC;AACF,QAAQ,CAAC,GAAG,GAAG,UAAS,OAAO;IAC3B,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC,CAAC;AAEF,QAAQ,CAAC,SAAS,GAAG;AAErB,CAAC,CAAC;AAEF,QAAQ,CAAC,SAAS,GAAG;AAErB,CAAC,CAAC;AAEF,MAAM,CAAC,OAAO,GAAG,QAAQ,CAAC"}
|
10
ts/index.ts
10
ts/index.ts
@ -29,6 +29,14 @@ smartenv.register = function(objectArg,paramName = "undefined") {
|
|||||||
};
|
};
|
||||||
smartenv.get = function(keyName) {
|
smartenv.get = function(keyName) {
|
||||||
return smartenv.items[keyName];
|
return smartenv.items[keyName];
|
||||||
}
|
};
|
||||||
|
|
||||||
|
smartenv.exportEnv = function() {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
smartenv.importEnv = function() {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = smartenv;
|
module.exports = smartenv;
|
||||||
|
@ -9,5 +9,8 @@ smartenv.info.print();
|
|||||||
beautylog.log(smartenv.get("docit").key1);
|
beautylog.log(smartenv.get("docit").key1);
|
||||||
smartenv.makeGlobal();
|
smartenv.makeGlobal();
|
||||||
beautylog.log(global.smartenv.get("docit").key1);
|
beautylog.log(global.smartenv.get("docit").key1);
|
||||||
|
var key2 = "hello";
|
||||||
|
smartenv.get("docit").key2 = key2;
|
||||||
|
beautylog.log(global.smartenv.get("docit").key2);
|
||||||
beautylog.success("Success!");
|
beautylog.success("Success!");
|
||||||
//# sourceMappingURL=test.js.map
|
//# sourceMappingURL=test.js.map
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,IAAI,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AACrC,IAAI,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;AAClD,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;AACtB,SAAS,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;AAClD,QAAQ,CAAC,QAAQ,CAAC,EAAC,IAAI,EAAC,OAAO,EAAC,EAAC,OAAO,CAAC,CAAC;AAC1C,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;AACtB,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AAC1C,QAAQ,CAAC,UAAU,EAAE,CAAC;AACtB,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AACjD,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC"}
|
{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,IAAI,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AACrC,IAAI,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;AAClD,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;AACtB,SAAS,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;AAClD,QAAQ,CAAC,QAAQ,CAAC,EAAC,IAAI,EAAC,OAAO,EAAC,EAAC,OAAO,CAAC,CAAC;AAC1C,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;AACtB,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AAC1C,QAAQ,CAAC,UAAU,EAAE,CAAC;AACtB,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AAEjD,IAAI,IAAI,GAAG,OAAO,CAAC;AACnB,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;AAClC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AAEjD,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC"}
|
@ -9,4 +9,9 @@ smartenv.info.print();
|
|||||||
beautylog.log(smartenv.get("docit").key1);
|
beautylog.log(smartenv.get("docit").key1);
|
||||||
smartenv.makeGlobal();
|
smartenv.makeGlobal();
|
||||||
beautylog.log(global.smartenv.get("docit").key1);
|
beautylog.log(global.smartenv.get("docit").key1);
|
||||||
|
|
||||||
|
var key2 = "hello";
|
||||||
|
smartenv.get("docit").key2 = key2;
|
||||||
|
beautylog.log(global.smartenv.get("docit").key2);
|
||||||
|
|
||||||
beautylog.success("Success!");
|
beautylog.success("Success!");
|
Loading…
Reference in New Issue
Block a user