mm_machine 1.6.5 → 1.6.6
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/demo/test1/index.js +1 -1
- package/demo/test2/index.js +1 -1
- package/index.js +18 -0
- package/package.json +1 -1
package/demo/test1/index.js
CHANGED
package/demo/test2/index.js
CHANGED
package/index.js
CHANGED
|
@@ -498,14 +498,32 @@ Index.prototype.sort = function() {
|
|
|
498
498
|
});
|
|
499
499
|
};
|
|
500
500
|
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* 更新前
|
|
504
|
+
*/
|
|
505
|
+
Index.prototype.update_before = async function(dir) {
|
|
506
|
+
console.log("更新前")
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* 更新后
|
|
512
|
+
*/
|
|
513
|
+
Index.prototype.update_after = async function(dir) {
|
|
514
|
+
console.log("更新后")
|
|
515
|
+
}
|
|
516
|
+
|
|
501
517
|
/**
|
|
502
518
|
* 更新配置
|
|
503
519
|
* @param {String} dir 检索的路径
|
|
504
520
|
*/
|
|
505
521
|
Index.prototype.update = async function(dir) {
|
|
522
|
+
await this.update_before(dir);
|
|
506
523
|
this.clear();
|
|
507
524
|
this.load(dir);
|
|
508
525
|
this.sort();
|
|
526
|
+
await this.update_after(dir);
|
|
509
527
|
};
|
|
510
528
|
|
|
511
529
|
/**
|