如何自动重新加载Clojure代码? [英] How to automatically reload Clojure code?
本文介绍了如何自动重新加载Clojure代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何自动重新载入 Clojure
代码?
How to automatically reload Clojure
code?
我观看了演示文稿。在那里,他们使用一些热插拔Clojure技术,当对源文件进行更改时重新加载代码。我可以运行代码,但我不能观察自动重新加载的效果。如何重新加载代码?
I have watched the presentation. And in there they use some hot swap Clojure technology that reloads code whenever changes are made into source files. I can run the code, but I can not observe the effect of auto reload. How is it possible to reload the code?
the source code.
推荐答案
根据情况,有很多方法可以重载代码:
There are many ways to reload code, depending on the situation:
- Emacs / CIDER 快速键重新加载文件。可能Rich正在做类似的事情。另请参阅:如何在REPL中重新加载clojure文件
- 观看文件和重新载入代码( figwheel for frontend development that that,that,that,测试插件以及专门用于运行测试的CIDER快捷键, boot has a
watch
task ...) - 服务器( ring 具有
ring.middleware.reload / wrap-reload对于此
,基座随附一个以及其他网络服务器,例如yada
与组件搭配使用) - 组件工作流程也有一个自动重新加载系统的示例,其中 holy-grail
- Emacs/CIDER shortcuts to reload a file. Probably Rich is doing something similar. Also see this: How to reload a clojure file in REPL
- watch files and reload the code (figwheel for frontend development does that, test plugins as well as CIDER shortcuts specifically for running tests, boot has a
watch
task...) - a middleware for the web server you use (ring has
ring.middleware.reload/wrap-reload for this
, pedestal comes with one as well, other webservers likeyada
play well with component) - a component workflow works also, there is an example of an auto-reloadable system with holy-grail
这篇关于如何自动重新加载Clojure代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文