1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2025-12-14 02:35:06 +00:00

Properly wait for first compile

This commit is contained in:
Cadence Ember
2020-06-02 02:55:19 +12:00
parent eeba2367af
commit 60cf13a22b
4 changed files with 15 additions and 15 deletions

View File

@@ -29,7 +29,5 @@ function customWriter(output) {
return output
}
setTimeout(() => {
console.log("[.] REPL started")
repl.start({prompt: "b) ", eval: customEval, writer: customWriter}).once("exit", () => process.exit())
}, 2000) // wait for pinski to initialise. TODO: do this properly
console.log("[.] REPL started")
repl.start({prompt: "b) ", eval: customEval, writer: customWriter}).once("exit", () => process.exit())

View File

@@ -55,7 +55,7 @@ subdirs("pug", async (err, dirs) => {
pinski.addAPIDir("api")
if (constants.as_assistant.enabled) {
console.log("Assistant API enabled")
console.log("[.] Assistant API enabled")
pinski.addAPIDir("assistant_api")
}
@@ -68,6 +68,8 @@ subdirs("pug", async (err, dirs) => {
console.log("[.] Server started")
if (process.stdin.isTTY || process.argv.includes("--enable-repl")) {
require("./repl")
pinski.waitForFirstCompile().then(() => {
require("./repl")
})
}
})