embark/lib/dashboard/repl.js

22 lines
313 B
JavaScript
Raw Normal View History

2018-07-23 12:30:58 +00:00
const repl = require("repl");
class REPL {
constructor(options) {
this.env = options.env;
}
start(done) {
2018-07-23 12:41:13 +00:00
let replServer = repl.start({
2018-07-23 12:30:58 +00:00
prompt: "Embark (" + this.env + ") > "
});
2018-07-23 12:41:13 +00:00
replServer.on('exit', () => {
process.exit();
});
2018-07-23 12:30:58 +00:00
done();
}
}
module.exports = REPL;