Skip to content

Commit

Permalink
Merge pull request #4 from swarthy/patch-1
Browse files Browse the repository at this point in the history
feat: added QUIET env variable support
  • Loading branch information
pacexy authored Oct 2, 2021
2 parents 6e3a72a + 02b9649 commit 8c2ffa6
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 8c2ffa6

Please sign in to comment.