美文网首页
配置ClojureScript环境(Cursive)

配置ClojureScript环境(Cursive)

作者: 业翔 | 来源:发表于2015-09-19 13:03 被阅读383次

    参考文档: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)即可。

    相关文章

      网友评论

          本文标题:配置ClojureScript环境(Cursive)

          本文链接:https://www.haomeiwen.com/subject/oogbcttx.html