chanjs 1.0.10 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- package/core/chan.js +4 -4
- package/package.json +1 -1
package/core/chan.js
CHANGED
@@ -10,8 +10,7 @@ const core = require("./lib/core.js");
|
|
10
10
|
class Chan {
|
11
11
|
constructor(options={}) {
|
12
12
|
//配置
|
13
|
-
Chan.config =
|
14
|
-
|
13
|
+
Chan.config = {...config,...options};
|
15
14
|
//模块
|
16
15
|
Chan.modules ={};
|
17
16
|
//工具
|
@@ -41,7 +40,8 @@ class Chan {
|
|
41
40
|
const configPath = path.join(config.APP_PATH, "config/index.js");
|
42
41
|
if (fs.existsSync(configPath)) {
|
43
42
|
const config = require(configPath);
|
44
|
-
|
43
|
+
let allConfig = {...Chan.config,...config};
|
44
|
+
this.app.config = Chan.config = allConfig;
|
45
45
|
}
|
46
46
|
}
|
47
47
|
|
@@ -242,4 +242,4 @@ class Chan {
|
|
242
242
|
}
|
243
243
|
}
|
244
244
|
|
245
|
-
module.exports = Chan;
|
245
|
+
module.exports = Chan;
|