Skip to content

Commit 945da0b

Browse files
Updating order of operations and error message
1 parent 064d3c7 commit 945da0b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

commands/watch.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module.exports = options => {
6363

6464
exec(cmd, (err, data, stderr) => {
6565
if (err || stderr) {
66-
console.error(err, stderr)
66+
console.log(chalk.red.bold(`✖ Build Error: ${err} {stderr}`))
6767
}
6868
})
6969
}
@@ -73,13 +73,12 @@ module.exports = options => {
7373

7474
// Watch for File Changes
7575
watcher.on('change', file => {
76-
// Check if we need to start a build
77-
buildCheck(file)
7876
upload({file, spinner, selected, client, instance, options})
77+
buildCheck(file)
7978
})
8079
watcher.on('add', file => {
81-
buildCheck(file)
8280
upload({file, spinner, selected, client, instance, options})
81+
buildCheck(file)
8382
})
8483

8584
// @TODO: Watch for Removing Files

0 commit comments

Comments
 (0)