This commit is contained in:
Benjamin Toby
2025-02-03 16:23:23 +01:00
parent 1e57cdbc1d
commit 0375c02931
5 changed files with 10 additions and 5 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+3 -2
View File
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = startProcess;
const fs_1 = __importDefault(require("fs"));
const console_colors_1 = __importDefault(require("./console-colors"));
const preflight_1 = __importDefault(require("./preflight"));
const run_1 = __importDefault(require("./run"));
const kill_child_1 = __importDefault(require("./kill-child"));
const chokidar_1 = __importDefault(require("chokidar"));
let childProcess = null;
const pTitle = "buncid";
process.title = pTitle;
@@ -36,7 +36,8 @@ function startProcess({ command, preflight, postflight, redeploy_file, port, fir
process.exit();
}
console.log("Watching", redeploy_file);
fs_1.default.watchFile(redeploy_file, { interval: 100 }, (curr, prev) => {
const watcher = chokidar_1.default.watch(redeploy_file, { ignoreInitial: true });
watcher.on("change", (path, stats) => {
clearTimeout(timeout);
timeout = setTimeout(() => {
console.log(`${console_colors_1.default.BgBlue}File Changed${console_colors_1.default.Reset}`);