mirror of https://github.com/embarklabs/embark.git
24 lines
343 B
JavaScript
24 lines
343 B
JavaScript
const repl = require("repl");
|
|
|
|
class REPL {
|
|
constructor(options) {
|
|
this.env = options.env;
|
|
}
|
|
|
|
start(done) {
|
|
this.replServer = repl.start({
|
|
prompt: "Embark (" + this.env + ") > ",
|
|
useGlobal: true
|
|
});
|
|
|
|
this.replServer.on("exit", () => {
|
|
process.exit();
|
|
});
|
|
|
|
done();
|
|
}
|
|
|
|
}
|
|
|
|
module.exports = REPL;
|