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