Skip to content

Commit c3d8f87

Browse files
committed
chore: fix bad rebase
1 parent ef415a9 commit c3d8f87

File tree

1 file changed

+3
-28
lines changed

1 file changed

+3
-28
lines changed

index.js

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function launch(ops) {
4646
const deleteRequireCache = {
4747
[initial]: false,
4848
}
49-
options.deleteRequireCache.forEach((m) => (deleteRequireCache[m] = true))
49+
options.deleteRequireCache.forEach(m => (deleteRequireCache[m] = true))
5050
process.on('exit', () => child && child.kill())
5151

5252
function done(codeOrError, signal) {
@@ -85,35 +85,10 @@ function launch(ops) {
8585
interval: options.interval || 100,
8686
binaryInterval: options.binaryInterval || 300,
8787
})
88-
<<<<<<< HEAD
89-
watcher.on('change', function (file) {
90-
if (deleteRequireCache[file]) {
91-
console.log(
92-
chalk.bold.red('[smart-restart]'),
93-
'File',
94-
path.relative(process.cwd(), file),
95-
'has changed, clearing require cache.'
96-
)
97-
for (let key in deleteRequireCache) {
98-
if (deleteRequireCache[key]) {
99-
delete require.cache[key]
100-
}
101-
}
102-
return
103-
}
104-
console.log(
105-
chalk.bold.red('[smart-restart]'),
106-
'File',
107-
path.relative(process.cwd(), file),
108-
'has changed, reloading.'
109-
)
110-
restart()
111-
=======
11288
watcher.on('change', function(file) {
11389
log('File', path.relative(process.cwd(), file), 'has changed')
11490
if (deleteRequireCache[file]) clearRequireCacheSoon()
11591
else restartSoon()
116-
>>>>>>> 962352e (fix: multiple issues)
11792
})
11893

11994
const args = [
@@ -136,7 +111,7 @@ function launch(ops) {
136111
child.on('error', done)
137112

138113
debug('spawned child pid: ', child.pid)
139-
child.on('message', (message) => {
114+
child.on('message', message => {
140115
debug('message received')
141116
const { status, file, parent, err, exit } = message
142117
if (exit != null) {
@@ -145,7 +120,7 @@ function launch(ops) {
145120
}
146121
if (status === 'ready') {
147122
debug('sending message:', options)
148-
child.send(options, (error) => {
123+
child.send(options, error => {
149124
if (error) debug(error.stack)
150125
})
151126
return

0 commit comments

Comments
 (0)