Skip to content

Commit

Permalink
feat: added QUEIT env variable support
Browse files Browse the repository at this point in the history
  • Loading branch information
swarthy committed Sep 29, 2021
1 parent 6e3a72a commit 02b9649
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/mv3-hot-reload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 02b9649

Please sign in to comment.