From 02b9649aade6ad78aaf221f4fe9305814693f814 Mon Sep 17 00:00:00 2001 From: swarthy Date: Wed, 29 Sep 2021 19:31:56 +0500 Subject: [PATCH] feat: added QUEIT env variable support --- bin/mv3-hot-reload.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/mv3-hot-reload.ts b/bin/mv3-hot-reload.ts index d6d9c96..19deec9 100644 --- a/bin/mv3-hot-reload.ts +++ b/bin/mv3-hot-reload.ts @@ -16,6 +16,7 @@ interface Config { let port = 9012 let directory = 'dist' let exclude: string[] = [] +const quiet = !!process.env.QUIET try { const CONFIG_PATH = path.resolve('mv3-hot-reload.config.js') @@ -51,7 +52,9 @@ wss.on('connection', (ws) => { 'all', debounce((_, path) => { if (!excludePaths.includes(path)) { - console.log('file change detected.') + if (!quiet) { + console.log('file change detected.') + } ws.send(Message.FileChange) } }, 500),