clojurescriptlighttable

How can I create a basic ClojureScript Hello World app in Lighttable?


The documentation seems quite sparse in LightTable. I want to create a very bare bones ClojureScript web application in LightTable as a starting point to build on. I have the Instarepl in Clojure working fine, and then I create a new file called dummy.cljs containing the following:

(ns dummy)

(js/alert "Hello lighttable")

How can I run this?

Update

I have figured this out now, and I will post a video on how todo it as it is quite visual.

Update 2

Here is the video:

http://www.youtube.com/watch?v=GZ6e0tKqYas


Solution

    1. you should first create a project via lein( https://github.com/technomancy/leiningen) as described here
    2. then add cljsbuild to your project, as described here
    3. run from terminal(or cmd on win) simultaneously lein ring server and lein cljsbuild auto, in order to run local web-server with clojurescript autocompile
    4. connect LightTable(via console at the bottom) to the project you've created in step 1
    5. now you can edit clojure and cljs in LightTable and changes should be delivered to your browser. But don't forget to check terminal for errors, as they probably won't be shown in LT.

    Simpler way would be using http://clojurescriptone.com/ and lein repl as main development tool and use LT only as additional tool for solving some small problems within one-two files.