我正在使用 lein cljsbuild 并希望找到一种无需刷新浏览器即可重新加载编译文件的方法。是否有内置的方法可以从我的浏览器连接的 REPL 中执行此操作?
最佳答案
使用 browser-repl可以得到我认为你要求的大部分。从网站:
A browser-connected REPL works in much the same way as a normal REPL:
forms are read from the console, evaluated and return values are printed.
A major and useful difference from normal REPL usage is that
all side-effects occur in the browser.
这会加载一个页面,然后使该页面等待来自 repl 的指令。这样,当您重新加载缓冲区时,页面将更改以匹配。
关于Clojurescript 命名空间刷新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14694222/