简体   繁体   English

如何用figwheel为clojurescript开发设置原子编辑器?

[英]How to set up atom editor for clojurescript development with figwheel?

It looks like the atom editor has a reasonable degree of clojure and clojurescript support through various packages. 看起来原子编辑器通过各种包装具有合理程度的clojure和clojurescript支持。 Does anyone have a recommended way to configure it to use figwheel? 有没有人有推荐的方法来配置它使用figwheel? Clearly this is possible using a separate terminal, but I'm interested in whether a more integrated in-edit REPL is possible. 很明显,这可以使用一个单独的终端,但我对是否可以使用更集成的编辑内REPL感兴趣。 One where the REPL executes code in the browser app. REPL在浏览器应用程序中执行代码的地方。

I'm looking for some help akin to that provided at https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL for the intellij/cursive ide. 我正在寻找一些类似于https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL为intellij / cursive ide提供的帮助。

Update: After reading Using the Figwheel REPL within NRepl , and realising that the 'Start REPL' command provided by the atom package proto-repl probably ran lein repl , I updated my project accordingly - see gist . 更新:阅读后使用NRepl中的Figwheel REPL ,并意识到原子包proto-repl提供的'Start REPL'命令可能运行了lein repl ,我相应地更新了我的项目 - 请参阅gist

Start REPL produced some promising output see gist , and the application started correctly in the browser. 启动REPL产生了一些有希望的输出, 请参阅gist ,并且应用程序在浏览器中正确启动。

Almost there! 快好了! This works, but so far I have not found a way to free up port 3449 again. 这是有效的,但到目前为止,我还没有找到一种方法来再次释放3449端口。 Not even closing down the editor and restarting does that. 甚至没有关闭编辑器并重新启动它。

Here's the issue 这是问题所在

user=> nil
(stop-figwheel!)
user=> nil
(start-figwheel!)
Figwheel: Starting server at http://127.0.0.1:3450
Port 3450 is already being used. 
Are you running another Figwheel instance? 
If you want to run two Figwheel instances add a new :server-port (i.e.:server-port 3450)
to Figwheel's config options in your project.clj

proto-repl repo的问题54中正在讨论这个问题,但目前还没有解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM