5
我正在構建一個燼應用程序,並發現我經常需要重新啓動brunch watch -s
命令,以更新我的應用程序。雖然早午餐會在每次更改時重新編譯,但如果我重新啓動該命令,這些更改只能通過。如何防止在早午餐手錶緩存-s
我做錯了什麼?有沒有解決這個問題的方法?
注:瀏覽器緩存關閉
更新:我想出如何調試早午餐;)我發現如下:
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
注意它有時收到取消鏈接事件,但是不會重建這些文件。我通過僅對contact.hbs文件進行了一些小改動來測試這一點。爲什麼服務器有時會重建,有時甚至沒有?
聽起來像一個錯誤。你在brunch-served-server文件中看到任何緩存頭文件嗎? – 2013-05-10 08:03:33
我檢查了服務器標題,並且有很多無緩存標題。我有另一個早午餐項目設置,它的效果稍好。有沒有配置問題? – Gevious 2013-05-12 17:45:33
非常懷疑它,也許你正在使用自定義服務器雖然(config.server.path) – 2013-05-14 19:15:40