mm_machine 1.7.0 → 1.7.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/index.js +10 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -519,7 +519,6 @@ Index.prototype.update_before = async function(dir) {
|
|
|
519
519
|
// console.log("更新前")
|
|
520
520
|
}
|
|
521
521
|
|
|
522
|
-
|
|
523
522
|
/**
|
|
524
523
|
* 更新后
|
|
525
524
|
*/
|
|
@@ -527,15 +526,22 @@ Index.prototype.update_after = async function(dir) {
|
|
|
527
526
|
// console.log("更新后")
|
|
528
527
|
}
|
|
529
528
|
|
|
529
|
+
/**
|
|
530
|
+
* 更新
|
|
531
|
+
*/
|
|
532
|
+
Index.prototype.update_main = async function(dir) {
|
|
533
|
+
this.clear();
|
|
534
|
+
this.load(dir);
|
|
535
|
+
this.sort();
|
|
536
|
+
}
|
|
537
|
+
|
|
530
538
|
/**
|
|
531
539
|
* 更新配置
|
|
532
540
|
* @param {String} dir 检索的路径
|
|
533
541
|
*/
|
|
534
542
|
Index.prototype.update = async function(dir) {
|
|
535
543
|
await this.update_before(dir);
|
|
536
|
-
this.
|
|
537
|
-
this.load(dir);
|
|
538
|
-
this.sort();
|
|
544
|
+
await this.update_main(dir);
|
|
539
545
|
await this.update_after(dir);
|
|
540
546
|
};
|
|
541
547
|
|