chanjs 1.0.28 → 1.0.29

Sign up to get free protection for your applications and to get access to all the features.
package/core/chan.js CHANGED
@@ -26,7 +26,6 @@ class Chan {
26
26
  this.router = express.Router();
27
27
  this.loadConfig();
28
28
  this.loadExtends();
29
- //加载核心(日志、favicon 图标、cookie、json、url、模板引擎、静态资源)
30
29
  this.loadCore();
31
30
  this.loadKnex();
32
31
  this.loadCors();
@@ -4,6 +4,8 @@ const path = require('path');
4
4
  * @description 根目录
5
5
  */
6
6
  const ROOT_PATH = process.cwd();
7
+ // 读取package.json文件
8
+ const {version='1.0.0',author='明空'} = require(path.join(ROOT_PATH, 'package.json'));
7
9
 
8
10
  /**
9
11
  * @description 程序目录
@@ -12,10 +14,11 @@ const APP_PATH = path.join(ROOT_PATH, 'app');
12
14
 
13
15
  let config = {
14
16
  JSON_LIMIT:"100kb",
15
- SqlDebug:true,
16
17
  logger : {
17
18
  level: 'dev',
18
19
  },
20
+ version,
21
+ author,
19
22
  env:'dev',
20
23
  template:'default',
21
24
  views:[], //模板路径
@@ -30,7 +33,7 @@ let config = {
30
33
  port: "3306",
31
34
  user: "root",
32
35
  password: "123456",
33
- database: "chanyue",
36
+ database: "chancms",
34
37
  charset: "utf8mb4",
35
38
  }
36
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chanjs",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "chanjs基于express 纯js研发的轻量级mvc框架。",
5
5
  "main": "core/chan.js",
6
6
  "module": "core/chan.js",
package/publish.bat ADDED
@@ -0,0 +1,4 @@
1
+ npm config set proxy null
2
+ npm cache clean --force
3
+ npm config set registry http://registry.npmmirror.com
4
+ npm publish