Clojurescript 命名空间刷新

标签 clojure clojurescript cljsbuild

我正在使用 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/

相关文章:

clojure - Clojure 符号名称中的美元符号 ($)

Clojure:无副作用计算是否执行多次

regex - 将连字符字符串转换为 CamelCase

syntax - Clojure — 英镑符号的含义?`

leiningen - 在 ClojureScript 中使用 Cljsbuild 编译外部 JS 文件

clojure - 使用 ring format-params 中间件访问发布的 json

clojurescript - om 组件应该返回什么以不渲染任何内容?

node.js - 如何将 ClojureScript Node REPL 连接到我的 :node-library shadow-cljs project?

namespaces - 引用外部 clojurescript 命名空间

clojurescript - lein figwheel vs lein cljsbuild auto