私のclojurescriptコードのproject.cljは:repl-options {:init-ns my-project.core}
と指定し、start-figwheel!
でfigwheelを開始します。 figwheel documentationではfigwheelの起動時figwheelをカスタム初期名前空間で始めるにはどうすればいいですか?
;; you can also just call (ra/start-figwheel!)
;; and figwheel will do its best to get your config from the
;; project.clj or a figwheel.edn file`
しかし、それはcljs.user
名前空間に私を置くことを言います。 figwheelがこのオプションを選ぶにはどうすればいいですか?次のように
私figwheel.cljに見えます:
(require '[figwheel-sidecar.repl :as r]
'[figwheel-sidecar.repl-api :as ra])
(ra/start-figwheel!
{:figwheel-options {}
:build-ids ["dev"]
:all-builds
[{:id "dev"
:figwheel {:devcards true}
:source-paths ["src"]
:compiler {:main 'my-project.core
:asset-path "js"
:output-to "resources/public/js/main.js"
:output-dir "resources/public/js"
:verbose true}}]})
(ra/cljs-repl)
私は基本的に、Googleのグループからthis questionを求めています。
外部REPLクライアントから 'lein repl -c'を使って接続したり、'(ra/start-figwheel) 'を実行しているのと同じREPLに名前空間を変更していませんか? –
私はfigwheel.cljを追加しました。私は私のブラウザに接続しています。そして、私がスクリプトを起動した端末にreplプロンプト( 'cljs.user'と一緒に)が現れます。私は 'lein repl:connect 3449'を試みましたが、これはちょうど掛かっていました。 – synthetic
':repl-options'は、figwheel自身ではなく、leinのreplタスクによってのみ使われると思います。あなたの 'figwheel.clj'はどうやって使うのですか?それをスクリプトとして実行するか、またはREPLセッションでロードしますか? –