mm_machine 2.4.0 → 2.4.2
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/drive.js +10 -1
- package/index.js +8 -1
- package/package.json +1 -1
package/drive.js
CHANGED
|
@@ -79,7 +79,7 @@ Drive.prototype._preset = function () {
|
|
|
79
79
|
* @param {string} file 配置文件路径
|
|
80
80
|
* @returns {object} 配置项
|
|
81
81
|
*/
|
|
82
|
-
Drive.prototype.
|
|
82
|
+
Drive.prototype._loadConfig = function (file) {
|
|
83
83
|
if (file) {
|
|
84
84
|
this.config_file = file;
|
|
85
85
|
};
|
|
@@ -99,6 +99,15 @@ Drive.prototype.loadConfig = function (file) {
|
|
|
99
99
|
return config;
|
|
100
100
|
};
|
|
101
101
|
|
|
102
|
+
/**
|
|
103
|
+
* 加载配置
|
|
104
|
+
* @param {string} file 配置文件路径
|
|
105
|
+
* @returns {object} 配置项
|
|
106
|
+
*/
|
|
107
|
+
Drive.prototype.loadConfig = function (file) {
|
|
108
|
+
this._loadConfig(file);
|
|
109
|
+
};
|
|
110
|
+
|
|
102
111
|
/**
|
|
103
112
|
* 设置配置
|
|
104
113
|
* @param {object} config 配置对象
|
package/index.js
CHANGED
|
@@ -202,7 +202,7 @@ Manager.prototype.updateInfo = function () {
|
|
|
202
202
|
/**
|
|
203
203
|
* 排序
|
|
204
204
|
*/
|
|
205
|
-
Manager.prototype.
|
|
205
|
+
Manager.prototype._sort = function () {
|
|
206
206
|
var sort_key = this.config.sort_key || 'sort';
|
|
207
207
|
this.infos.sort((o1, o2) => {
|
|
208
208
|
let p1 = o1[sort_key] || 100;
|
|
@@ -211,6 +211,13 @@ Manager.prototype.sort = function () {
|
|
|
211
211
|
});
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
+
/**
|
|
215
|
+
* 排序
|
|
216
|
+
*/
|
|
217
|
+
Manager.prototype.sort = function () {
|
|
218
|
+
this._sort();
|
|
219
|
+
};
|
|
220
|
+
|
|
214
221
|
// ==== 模块管理接口 ====
|
|
215
222
|
/**
|
|
216
223
|
* 删除模块
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_machine",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2",
|
|
4
4
|
"description": "A flexible Node.js plugin mechanism system for dynamic loading, management and execution of modules. Supports hot reload, lifecycle management, and modern JavaScript features.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|