mirror of
https://github.com/araxiaonline/wow-eluna-ts-module.git
synced 2026-06-13 02:42:22 -04:00
updated ets to kill background processes
This commit is contained in:
49
.bin/ets.js
49
.bin/ets.js
@@ -135,39 +135,32 @@ function buildModules(luaDir, moduleDir, watch, liveReload) {
|
||||
tscwatch.start("--outDir", outputDir);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// if (watch && liveReload) {
|
||||
// log.info(`Starting Eluna watcher... (THIS ONLY WORKS WITH DOCKER CONFIGS!)`);
|
||||
// const runShellScript = () => {
|
||||
// const scriptProcess = spawn("./send-reload-eluna.sh");
|
||||
|
||||
// scriptProcess.stdout.on("close", (data) => {
|
||||
// log.success("Reloading Eluna complete..");
|
||||
// });
|
||||
|
||||
// scriptProcess.stderr.on("data", (data) => {
|
||||
// log.error(`Script Error: ${data}`);
|
||||
// });
|
||||
// };
|
||||
|
||||
// const rerunEluna = _.debounce(runShellScript, 300);
|
||||
// fs.watch(outputDir, (eventType, filename) => {
|
||||
// if (eventType === "change" || eventType === "rename") {
|
||||
// log.info(`Change detected in ${filename}. \nReloading eluna...`);
|
||||
// rerunEluna();
|
||||
// }
|
||||
// });
|
||||
|
||||
// log.success("Starting Eluna watcher...");
|
||||
// runShellScript();
|
||||
// }
|
||||
|
||||
} catch (error) {
|
||||
|
||||
// Clean up any processes that are running.
|
||||
if(tscwatch) {
|
||||
tscwatch.stop();
|
||||
}
|
||||
|
||||
if(reloadprocess) {
|
||||
reloadprocess.kill();
|
||||
}
|
||||
|
||||
log.error(`Error occurred: ${error.message}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Clean up any processes that are running.
|
||||
process.on("exit", () => {
|
||||
if(tscwatch) {
|
||||
tscwatch.stop();
|
||||
}
|
||||
|
||||
if(reloadprocess) {
|
||||
reloadprocess.kill();
|
||||
}
|
||||
})
|
||||
|
||||
return;
|
||||
}
|
||||
/**
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
if (command == "hello") {
|
||||
const message = "Hello World command was entered!";
|
||||
|
||||
PrintInfo(message);
|
||||
SendWorldMessage(message);
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user