【问题标题】:Connect Cider to Luminus +CLJS Figwheel repl将苹果酒连接到 Luminus +CLJS Figwheel repl
【发布时间】:2015-12-14 23:59:48
【问题描述】:

过去我曾非常简单地使用过 Cider REPL;在项目的 clj 文件中,我使用 cider-jack-in 并且我很高兴(假设我的 .lein/profiles.clj 中有以下内容@

;; ~/.lein/profiles.clj
{:user {:plugins [[lein-localrepo "0.5.2"]
          [cider/cider-nrepl "0.10.0-SNAPSHOT"]]
    :dependencies [[org.clojure/tools.nrepl "0.2.7"]]
    }}

现在开箱即用:

<user> Clojure/ 17:44$ lein new luminus wants-cider +cljs
Generating a Luminus project.
<user> Clojure/ 17:45$ cd wants-cider/
<user> wants-cider/ 17:45$ lein run
15-Sep-17 17:45:59 user-linuxbox INFO [wants-cider.core] - nREPL server started on port 7000
15-Sep-17 17:45:59 user-linuxbox INFO [wants-cider.handler] - 
-=[wants-cider started successfully using the development profile]=-
17:45:59.789 INFO  [org.projectodd.wunderboss.web.Web] (main) Registered web context /
15-Sep-17 17:45:59 user-linuxbox INFO [wants-cider.core] - server started on port: 3000

# new shell
<user> wants-cider/ 17:50$ lein figwheel
Figwheel: Starting server at http://localhost:3449
Focusing on build ids: app
Compiling "resources/public/js/app.js" from ["src-cljs" "env/dev/cljs"]...
Successfully compiled "resources/public/js/app.js" in 5.757 seconds.
Started Figwheel autobuilder
WARNING: unable to load "cemerick.piggieback/wrap-cljs-repl" middleware

Launching ClojureScript REPL for build: app

# ... insructions ...

Prompt will show when figwheel connects to your application
To quit, type: :cljs/quit
cljs.user=> 

从这里,我如何连接我的 Cider REPL?

【问题讨论】:

    标签: clojure clojurescript read-eval-print-loop cider figwheel


    【解决方案1】:

    您必须在project.clj:profiles :dev 部分中指定figwheel nrepl 选项:

     :profiles {:dev {
                       ;; ....
                       :figwheel {:nrepl-port 7888 }
    

    然后从 CIDER 连接到 nrepl:

    C-c M-c <or> M-x cider-connect
    ;; enter figwheel host, port, in this case -- localhost, 7888
    ;; then, in appeared REPL buffer:
    user> (use 'figwheel-sidecar.repl-api)
    user> (cljs-repl)
    cljs.user=> 
    

    信息: https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-06
      • 2015-03-15
      • 2019-02-13
      • 2019-06-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多