Hi, I just updated the cljs-start lein-template to create a cljs lib with batteries included:
- directories layout of a cljs lib project - cljsbuild configurations - clojurescript.test configuration and setup - brepl connection The most significant update regards the substitution of the piggieback lib with the austin plugins from Chas Emerick. All the Austin use cases should work as expected (but I did not test them intensively). To create a new cljs lib with batteries included: lein new cljs-start wonderful-lib cd wonderful-lib lein compile lein test To connect the be repl: lein repl Compiling ClojureScript. nREPL server started on port 55101 on host 127.0.0.1 REPL-y 0.2.1 Clojure 1.5.1 Docs: (doc function-name-here) (find-doc "part-of-name-here") Source: (source function-name-here) Javadoc: (javadoc java-object-or-class-here) Exit: Control+D or (exit) or (quit) Results: Stored in vars *1, *2, *3, an exception in *e ring.server=> Then run the http-server ring.server=> (run) 2013-11-18 22:54:42.997:INFO:oejs.Server:jetty-7.6.8.v20121106 2013-11-18 22:54:43.026:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:3000 #<Server org.eclipse.jetty.server.Server@3e522509> ring.server=> Next create the brepl environment and launch it ring.server=> (def repl-env (reset! cemerick.austin.repls/browser-repl-env (cemerick.austin/repl-env))) Browser-REPL ready @ http://localhost:55146/5840/repl/start #'ring.server/repl-env ring.server=> (cemerick.austin.repls/cljs-repl repl-env) Type `:cljs/quit` to stop the ClojureScript REPL nil cljs.user=> Finally, just visit the localhost:3000 url, wait a moment and then you can go back to brepl in clojurescript for supporting the development of your wonderful cljs lib. HIH Mimmo On Oct 31, 2013, at 11:33 PM, Mimmo Cosenza <mimmo.cose...@gmail.com> wrote: > Hi all, > I just create a simple leon-template to create CLJS libs with batteries > included: > > - separation of concerns between the user view and the dev view of the > created lib (obtained by using the profiles.clj local to the project > - http server and brepl (with piggieback by Chas) to bREPLing with the > project (everything is kept separated in the profiles.clj) > - unit test lib included (clojurescript.test by Chas) > - compilatation included of each build optimisation > - test-command already defined for phantoms > - and few other minutiae > > I also started to write a quick README to use it. > > https://github.com/magomimmo/cljs-start > > Here is a very quick start > > lein new cljs-start your-project > cd your-project > lein compile > lein test > > To connect with the browser > > lein repl > >(require '[ring.server :as http]) > > (http/run) > > (browser-repl) > > Now visit localhost:3000 and wait a moment to go back to repl > > cljs.user> (cemerick.cljs.test/run-all-tests) > > To generate the jar > > lein jar > > Everything is just started, so be benevolent with me. > > Feedback are appreciated, even the bad ones. > > HIH > > mimmo
signature.asc
Description: Message signed with OpenPGP using GPGMail