mm_statics 1.5.9 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +2 -0
  2. package/package.json +3 -2
package/index.js CHANGED
@@ -49,6 +49,8 @@ class Static {
49
49
  */
50
50
  Static.prototype.setConfig = function (config) {
51
51
  Object.assign(this.config, config || {});
52
+ // 判断root是否绝对路径,不是则改成绝对路径
53
+ this.config.root = this.config.root.fullname();
52
54
  };
53
55
 
54
56
  /**
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "mm_statics",
3
- "version": "1.5.9",
3
+ "version": "1.6.0",
4
4
  "description": "这是超级美眉statics函数模块,用于web服务端statics缓存",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "test": "mocha tests/*.js"
7
+ "test": "node ./tests/index.js",
8
+ "tests": "mocha tests/*.js"
8
9
  },
9
10
  "repository": {
10
11
  "type": "git",