zotero-plugin-scaffold 0.0.23 → 0.0.24
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/dist/cli.mjs +1 -1
- package/dist/index.mjs +8 -9
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -755,7 +755,12 @@ class Serve extends Base {
|
|
|
755
755
|
if (path2.endsWith(".ts")) {
|
|
756
756
|
this.builder.esbuild();
|
|
757
757
|
} else {
|
|
758
|
-
this.builder.run();
|
|
758
|
+
await this.builder.run();
|
|
759
|
+
}
|
|
760
|
+
if (this.ctx.server.asProxy) {
|
|
761
|
+
this.reload();
|
|
762
|
+
this.logger.info("Reloaded done.");
|
|
763
|
+
await this.ctx.hooks.callHook("serve:onReloaded", this.ctx);
|
|
759
764
|
}
|
|
760
765
|
} catch (err) {
|
|
761
766
|
this.logger.error(err);
|
|
@@ -767,18 +772,12 @@ class Serve extends Base {
|
|
|
767
772
|
this.logger.ready("Server Ready! \n");
|
|
768
773
|
}).on("change", async (path2) => {
|
|
769
774
|
if (this.ctx.server.asProxy) {
|
|
770
|
-
|
|
771
|
-
|
|
775
|
+
console.clear();
|
|
776
|
+
this.logger.log(`${path2} changed`);
|
|
772
777
|
} else {
|
|
773
778
|
console.log("");
|
|
774
779
|
}
|
|
775
|
-
onChange.cancel();
|
|
776
780
|
onChange(path2);
|
|
777
|
-
if (this.ctx.server.asProxy) {
|
|
778
|
-
this.reload();
|
|
779
|
-
this.logger.info("Reloaded done.");
|
|
780
|
-
await this.ctx.hooks.callHook("serve:onReloaded", this.ctx);
|
|
781
|
-
}
|
|
782
781
|
}).on("error", (err) => {
|
|
783
782
|
this.logger.error("Server start failed!", err);
|
|
784
783
|
});
|