// pig.jsexport defaultfunction getEaten() { console.log("You got eaten by the pig. Good job.");}
const getEaten = require('./pig').default;
Also, I just got an idea for QSI integration. Can you replace the CommonJS term module with something that would allow you to have the engine output and take input from the terminal? That way a developer could handle that without having to leave the IDE.
Not sure what you're getting at here. You can print stuff to the (real) terminal using console.log() or one of its variants; there's no way to read from stdin though, that seems like something that's out of Sphere's jurisdiction?
Why can't it use stdin?