1
0
Fork 0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2026-03-01 18:31:35 +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
No known key found for this signature in database
GPG key ID: 128B99B1B74A6412
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")
})
}
})