Thank you, yours is what I tried first and it's definitely fastest, sub second after first compile. However there is no REPL like cljs-start and couple of others I tested have. Between cljsbuild, Austin and LightTable I haven't yet found a stable and fast solution yet. I'll try adding these various REPLS to your example and see what happens.
External browser with REPL inside LightTable seems easiest for a noob like me. Unfortunately LT doesn't support that use case yet, and you can't use Chrome debugger inside it. I still need to see what the browser thinks is happening and not just the ClojureScript's side.
I did manage to get React + JSX, CoffeeScript and ClojureScript + bREPL working with LiveReload, in a single page app. That felt truly powerful.
Some notes about what I did here: you start the server by running (go), you can quit the CLJS repl easily by typing in :cljs/quit as normal and return to the user namespace and then safely (stop) or (reset), stop will stop the server and reset will refresh all of your Clojure namespaces (useful if you're writing macros in Clojure for use in ClojureScript).
Aside from this, just turn on cljsbuild auto with :optimizations :none, and code recompiles are sub-second.
Thank you. I will definitely take a look at these over the weekend. User.clj seems particularly useful. Reloaded workflow reminds me of IPython, where you need to reload modules and reset the object instances for the new code to take effect.
> External browser with REPL inside LightTable seems easiest for a noob like me. Unfortunately LT doesn't support that use case yet...
It certainly does :)
On the connections panel click 'Add connection' and then 'Browser (External)'
The first time you do that it will give you a script tag to add to your page. Once you've added that and loaded the page in the browser, try again and it will connect.
You can email me (jamie@kodowa.com) or the LT group (light-table-discussion@googlegroups.com) if you have any problems :)
Ah, I see. Thanks for the pointer. The docs on connections pane list only JavaScript, CSS and HTML can be evaluated, so I did not try with ClojureScript. I however did try to connect from LT to nREPL which had a running bREPL to external browser. That did not work (no connection), though I have no idea if it even should... ;)
I'll see how it goes and will post to the LT group if I stumble on something.
> The docs on connections pane list only JavaScript, CSS and HTML can be evaluated
Ah, that's because its a two stage process. You need something that can compile cljs to js (eg nrepl) and something that can eval js (eg browser, node, lighttable).
I think I was confused about that at first too. We should figure out how to make it clearer.
External browser with REPL inside LightTable seems easiest for a noob like me. Unfortunately LT doesn't support that use case yet, and you can't use Chrome debugger inside it. I still need to see what the browser thinks is happening and not just the ClojureScript's side.
I did manage to get React + JSX, CoffeeScript and ClojureScript + bREPL working with LiveReload, in a single page app. That felt truly powerful.