I'm building an ember application and have found that I constantly need to restart the brunch watch -s
command, to have my application updated. While brunch recompiles on every change, the changes only pull through if I restart the command.
Am I doing something wrong? Is there a way around this problem?
Note: Browser caching is turned off
Update: I figured out how to debug brunch ;) What I found is the following:
brunch:common Writing file 'public/javascripts/app.js' +14s
29 May 20:47:46 - info: compiled in 73ms
brunch:watch File 'app/templates/contact.hbs' received event 'change' +3s
brunch:file-list Compiled file 'app/templates/contact.hbs' +3s
brunch:generated-file Joining files 'app/app.js, app/controllers/contact.js, app/initialize.js, app/models/category.js, app/models/marker.js, app/models/stock.js, app/routes/application.js, app/routes/category/index.js, app/routes/contact.js, app/templates/about.hbs, app/templates/application.hbs, app/templates/blog.hbs, app/templates/categories.hbs, app/templates/category.hbs, app/templates/category/index.hbs, app/templates/contact.hbs, app/templates/contactEntry.hbs, app/templates/index.hbs, app/templates/new.hbs, app/templates/specials.hbs, app/views/contact.js, app/views/contactEntry.js' to 'public/javascripts/app.js' +3s
brunch:common Writing file 'public/javascripts/app.js' +3s
29 May 20:47:50 - info: compiled in 73ms
brunch:watch File 'app/templates/contact.hbs' received event 'unlink' +6s
29 May 20:47:57 - info: compiled in 67ms
brunch:watch File 'app/templates/contact.hbs' received event 'add' +99ms
brunch:source-file Initializing fs_utils.SourceFile: {"path":"app/templates/contact.hbs","isHelper":false,"isVendor":false} +10s
brunch:file-list Compiled file 'app/templates/contact.hbs' +6s
brunch:generated-file Joining files 'app/app.js, app/controllers/contact.js, app/initialize.js, app/models/category.js, app/models/marker.js, app/models/stock.js, app/routes/application.js, app/routes/category/index.js, app/routes/contact.js, app/templates/about.hbs, app/templates/application.hbs, app/templates/blog.hbs, app/templates/categories.hbs, app/templates/category.hbs, app/templates/category/index.hbs, app/templates/contact.hbs, app/templates/contactEntry.hbs, app/templates/index.hbs, app/templates/new.hbs, app/templates/specials.hbs, app/views/contact.js, app/views/contactEntry.js' to 'public/javascripts/app.js' +6s
brunch:common Writing file 'public/javascripts/app.js' +6s
Notice how sometimes it receives the unlink event, but then doesn't rebuild the files. I tested this by making small changes to only the contact.hbs file. Why is it that the server sometimes rebuilds and sometimes not?
From my discussion with Paul Miller, this was fixed in 1.7.0 pre and will be released soon
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With