Created
March 14, 2012 18:52
-
-
Save swannodette/2038633 to your computer and use it in GitHub Desktop.
project.clj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject cljs-demo "0.1.0-SNAPSHOT" | |
:description "ClojureScripting!" | |
:dev-dependencies [[lein-cljsbuild "0.1.2"]] | |
:cljsbuild {:builds [{:source-path "src" | |
:compiler {:optimizations :simple | |
:pretty-print true}}]}) | |
;; then from project directory | |
;; --------------------------- | |
;; | |
;; lein deps - grabs dependencies | |
;; lein cljsbuild auto - to start watching files as they change | |
;; lein trampoline cljsbuild repl-listen - for browser REPL |
It's early days yet :) The Browser REPL should always work, though sometime you need to refresh the browser to make sure a connection has been made.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In fact that's more or less what I ended up with:
and then my
core.cljs
is something like this:Which works if I run server hosting my html page, but sometimes it get's stuck or has some random glitches, so I gave up on it for the time being. Ideally my project files would have being hosted on 'http://localhost:9000/' so I could just start palying with it, but I have to learn more before I'd be able to patch "lein-cljsbuild" to do that :)
Thanks for the hints! Now I wish I ranted yesterday about this, that would have saved me a lot of time :)