More colors

This commit is contained in:
Chi Vinh Le
2018-07-13 19:49:39 -03:00
parent 1cd4d537af
commit 5f756056b1
3 changed files with 7 additions and 4 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
import chalk from "chalk";
import spawn from "cross-spawn";
import { Cancelable, debounce } from "lodash";
@@ -65,9 +66,9 @@ export default class CommandExecutor implements Executor {
child.on("close", (code: number) => {
this.isRunning = false;
if (code !== 0) {
if (code !== 0 && code !== null) {
// tslint:disable-next-line: no-console
console.log(`We had an error building ${code}`);
console.log(chalk.red(`Command exited with ${code}`));
}
if (this.shouldRespawn) {
this.spawnProcessPotentiallyDebounced();
+2 -1
View File
@@ -1,3 +1,4 @@
import chalk from "chalk";
import { ChildProcess } from "child_process";
import spawn from "cross-spawn";
import { Cancelable, debounce } from "lodash";
@@ -41,7 +42,7 @@ export default class LongRunningExecutor implements Executor {
if (code !== 0 && code !== null) {
// tslint:disable-next-line: no-console
console.error(`Exit code returned ${code}`);
console.log(chalk.red(`Command exited with ${code}`));
return;
}
if (this.shouldRestart) {
+2 -1
View File
@@ -1,3 +1,4 @@
import chalk from "chalk";
import { execSync } from "child_process";
import sane from "sane";
@@ -34,7 +35,7 @@ export default class SaneWatcher implements Watcher {
if (this.watchman === undefined && canUseWatchman()) {
this.watchman = true;
// tslint:disable-next-line:no-console
console.log("Watchman detected");
console.log(chalk.grey(`Watchman detected`));
}
}