mm_machine 1.4.1 → 1.4.4
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.
- package/index.js +11 -7
- package/package.json +34 -34
package/index.js
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* @author <a href="http://qww.elins.cn">邱文武</a>
|
|
4
4
|
* @version 1.2
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
require('mm_expand');
|
|
6
|
+
var conf = require('mm_config');
|
|
8
7
|
|
|
9
8
|
const fs = require('fs');
|
|
10
9
|
|
|
@@ -36,7 +35,7 @@ class Item {
|
|
|
36
35
|
/**
|
|
37
36
|
* 配置参数
|
|
38
37
|
*/
|
|
39
|
-
this.config = {
|
|
38
|
+
this.config = conf({
|
|
40
39
|
/**
|
|
41
40
|
* 名称, 由中英文和下“_”组成, 用于卸载接口 例如: demo
|
|
42
41
|
*/
|
|
@@ -65,7 +64,7 @@ class Item {
|
|
|
65
64
|
* 开关, true表示开启,false表示关闭
|
|
66
65
|
*/
|
|
67
66
|
"switch": true
|
|
68
|
-
};
|
|
67
|
+
});
|
|
69
68
|
|
|
70
69
|
/**
|
|
71
70
|
* 模块目录
|
|
@@ -345,9 +344,14 @@ Index.prototype.load_list = function(list) {
|
|
|
345
344
|
_this.load_item(dir, obj, file);
|
|
346
345
|
}
|
|
347
346
|
} else {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
347
|
+
if (_this.Drive) {
|
|
348
|
+
var drive = new _this.Drive();
|
|
349
|
+
drive.new_config(file);
|
|
350
|
+
} else {
|
|
351
|
+
var fl = _this.dir_base + "/config.tpl.json";
|
|
352
|
+
if (fl.hasFile()) {
|
|
353
|
+
fl.copyFile(file);
|
|
354
|
+
}
|
|
351
355
|
}
|
|
352
356
|
}
|
|
353
357
|
});
|
package/package.json
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "mm_machine",
|
|
3
|
-
"version": "1.4.
|
|
4
|
-
"description": "这是超级美眉框架机制构建辅助模块,用于快速构建一个机制",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "node test.js"
|
|
8
|
-
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/qiuwenwu/mm_machine.git"
|
|
12
|
-
},
|
|
13
|
-
"keywords": [
|
|
14
|
-
"common",
|
|
15
|
-
"com",
|
|
16
|
-
"run",
|
|
17
|
-
"cmd",
|
|
18
|
-
"load",
|
|
19
|
-
"save",
|
|
20
|
-
"get",
|
|
21
|
-
"set",
|
|
22
|
-
"add",
|
|
23
|
-
"del"
|
|
24
|
-
],
|
|
25
|
-
"author": "邱文武",
|
|
26
|
-
"license": "ISC",
|
|
27
|
-
"bugs": {
|
|
28
|
-
"url": "https://github.com/qiuwenwu/mm_machine/issues"
|
|
29
|
-
},
|
|
30
|
-
"homepage": "https://github.com/qiuwenwu/mm_machine#readme",
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "mm_machine",
|
|
3
|
+
"version": "1.4.4",
|
|
4
|
+
"description": "这是超级美眉框架机制构建辅助模块,用于快速构建一个机制",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "node test.js"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/qiuwenwu/mm_machine.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"common",
|
|
15
|
+
"com",
|
|
16
|
+
"run",
|
|
17
|
+
"cmd",
|
|
18
|
+
"load",
|
|
19
|
+
"save",
|
|
20
|
+
"get",
|
|
21
|
+
"set",
|
|
22
|
+
"add",
|
|
23
|
+
"del"
|
|
24
|
+
],
|
|
25
|
+
"author": "邱文武",
|
|
26
|
+
"license": "ISC",
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/qiuwenwu/mm_machine/issues"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com/qiuwenwu/mm_machine#readme",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"mm_config": "^1.0.2"
|
|
33
|
+
}
|
|
34
|
+
}
|