5

我正在构建一个 ember 应用程序,发现我经常需要重新启动brunch watch -s命令,以更新我的应用程序。虽然 brunch 会在每次更改时重新编译,但只有在我重新启动命令时更改才会生效。

难道我做错了什么?有没有办法解决这个问题?

注意:浏览器缓存已关闭

更新:我想出了如何调试早午餐;)我发现如下:

 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

请注意有时它如何接收 unlink 事件,但随后不重建文件。我通过仅对contact.hbs 文件进行小的更改来测试这一点。为什么服务器有时会重建,有时不会?

4

1 回答 1

1

根据我与 Paul Miller 的讨论,这已在 1.7.0 pre 中修复,并将很快发布

于 2013-06-12T18:29:04.283 回答