You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
emits a change event with the results hash that includes the filePath that changed and triggered the build
Because the build is debounced, it's possible for multiple files to change before the build starts, but only the first one will get reported in the results hash filePath property.
This can be demonstrated by changing two files very quickly, e.g.:
I'm not sure how "public" the filePath property on the hash is considered to be, but the livereload server in ember-cli does use that property to determine whether it should trigger a livereload notification in the shouldTriggerReload method.
If it seems like a good idea to gather all the filepaths that changed before the build started and report them in a filePaths property on the results hash I would be happy to make a PR for that.
The text was updated successfully, but these errors were encountered:
I first noticed this when I realized ember-cli's project.liveReloadFilterPatterns option wasn't working properly for me, and after digging in I discovered that my editor (vim) uses a "save" strategy that involves creating a very-short-lived temp file before modifying the original file. broccoli-sane-watcher was noticing the temp file change before the actual file change, and as a result only reporting the deletion of the temp file to ember-cli's shouldTriggerReload method.
When a change is detected, the watcher builds and then
change
event with the resultshash
that includes thefilePath
that changed and triggered the buildBecause the build is debounced, it's possible for multiple files to change before the build starts, but only the first one will get reported in the results hash
filePath
property.This can be demonstrated by changing two files very quickly, e.g.:
touch path/to/a.js && touch path/to/b.js
-> broccoli-sane-watcher emits change with{filePath: path/to/a.js}
touch path/to/b.js && touch path/to/a.js
-> broccoli-sane-watcher emits change with{filePath: path/to/b.js}
I'm not sure how "public" the
filePath
property on the hash is considered to be, but the livereload server in ember-cli does use that property to determine whether it should trigger a livereload notification in theshouldTriggerReload
method.If it seems like a good idea to gather all the filepaths that changed before the build started and report them in a
filePaths
property on the resultshash
I would be happy to make a PR for that.The text was updated successfully, but these errors were encountered: