mikser-io 11.12.0 → 11.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/manager.js +13 -1
package/package.json
CHANGED
package/src/manager.js
CHANGED
|
@@ -166,6 +166,18 @@ const AWAIT_WRITE_FINISH = { stabilityThreshold: 500, pollInterval: 100 }
|
|
|
166
166
|
const WATCH_DEFAULTS = {
|
|
167
167
|
ignored: ignoreJunk,
|
|
168
168
|
ignoreInitial: true,
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Only the SOURCE watcher settles. `watchFolder` below is the generic one —
|
|
172
|
+
// mikser-io-live points it at the output folder to push browser reloads, and
|
|
173
|
+
// mikser-io-auth at an htpasswd — and neither has the problem this solves:
|
|
174
|
+
// those files are written by mikser itself or edited in place, not staged
|
|
175
|
+
// under a temporary name by an upload tool. Applying it there only delays a
|
|
176
|
+
// reload, and measurably: an event that arrived in 3ms arrives in 753ms with
|
|
177
|
+
// a 500ms settle, on top of live's own 250ms debounce. A caller that wants it
|
|
178
|
+
// asks, the way files.js does.
|
|
179
|
+
const SOURCE_WATCH_DEFAULTS = {
|
|
180
|
+
...WATCH_DEFAULTS,
|
|
169
181
|
awaitWriteFinish: AWAIT_WRITE_FINISH,
|
|
170
182
|
}
|
|
171
183
|
|
|
@@ -218,7 +230,7 @@ export function watch(name, folder, options = {}) {
|
|
|
218
230
|
}
|
|
219
231
|
}
|
|
220
232
|
|
|
221
|
-
chokidar.watch(folder, { ...
|
|
233
|
+
chokidar.watch(folder, { ...SOURCE_WATCH_DEFAULTS, ...options })
|
|
222
234
|
.on('all', () => {
|
|
223
235
|
clearTimeout(runtime.engine.processTimeout)
|
|
224
236
|
})
|