配置ClojureScript环境(Cursive)

参考文档:Running figwheel in a Cursive Clojure REPL

1、最好先使用lein模板创建:lein new figwheel hello-world.
2、在根目录创建: script/repl.clj,内容如下:

(use 'figwheel-sidecar.repl-api)
(start-figwheel! {:all-builds (figwheel-sidecar.repl/get-project-cljs-builds)})
(cljs-repl)

3、
Click Run->Edit configurations.
Click the +
button at the top left and choose Clojure REPL
Enter a name in the Name field (e.g. "REPL")
Choose the radio button Use clojure.main in normal JVM process
In the Parameters field put script/repl.clj
Click the OK button to save your REPL config.
大致如图所示:

Paste_Image.png

4、执行 run->run script即可。在浏览器上打开 http://localhost:3449/,就可以连接repl了。

注意:如果出现修改源代码没有自动通知到浏览器,或者出现404错误,那么在repl中执行 (reset-autobuild)即可。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容