chanjs 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/core/chan.js +4 -4
  2. 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 = Object.assign(config, options);
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
- Chan.config = {...Chan.config,...config};
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chanjs",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "Chanjs develops a lightweight MVC framework based on express pure JavaScript",
5
5
  "main": "core/chan.js",
6
6
  "module":"core/chan.js",