How to configure in Cursive for Clojurescript?

How to start a new project? How to compile, test and run?

Since the quick start guide says nothing about cljs.

+6
source share
1 answer

At the command line, use boot or leiningen (also known as lein) to configure your project, then from IntelliJ go to File->Open in the directory of your application and edit the source files that will be collected in the project for you. An important file to view is project.clj, which is the lein project file that IntelliJ will receive.

Setting up the lein cljs project from scratch is explained in Try Figwheel in here .

It’s best to use a Chrome browser. With Figwheel, when you save the source files that you are editing, your visible changes are displayed in a browser window (or perhaps in the browser’s developer’s console - good to open it), you open.

So you can just use IntelliJ as an editor. In the background, Figwheel will see the changes you have made, and if an error appears, it will appear either on the "up" display of the browser (ie, in the browser window) or in the REPL console that you opened. From REPL, you can do something like warnings that appear in the browser. All this is explained on the Figwheel page ...

There are quite a few moving parts (four in general - two consoles, an editor and a browser window). It is interesting to note that your FigWheel REPL console (your "dos field") will tell you where to open the browser, most likely at http://localhost:3449/ .

Edit
Here's an alternative way to customize the Figwheel cljs project. More recent and slightly more "manual" than the description of "Try Figwheel". Once complete, simply remove the Om-Next dependency if you do not want it.

Edit
I wanted to share that it is now quite possible to have REPL in Cursive, so we can confirm that there is a better way than the "dos field". See Launch in here

Edit
Chestnut's “Leiningen Web Application Beginner Friendly Template” has just been updated with the current state of the art.

Edit (04/26/2017)
Starting from scratch with Clojurescript

+8
source

All Articles