UNPKG

694 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.displayManualRestartTip = exports.listenForManualRestart = void 0;
4const chalk = require("chalk");
5function listenForManualRestart(callback) {
6 const stdinListener = (data) => {
7 if (data.toString().trim() === 'rs') {
8 process.stdin.removeListener('data', stdinListener);
9 callback();
10 }
11 };
12 process.stdin.on('data', stdinListener);
13}
14exports.listenForManualRestart = listenForManualRestart;
15function displayManualRestartTip() {
16 console.log(`To restart at any time, enter ${chalk.gray('rs')}.\n`);
17}
18exports.displayManualRestartTip = displayManualRestartTip;