-
Notifications
You must be signed in to change notification settings - Fork 0
Getting started
To install the Starter Kit, clone its git repository and the ClojureScript repository.
Clone and setup clojurescript
:
git clone git://github.com/clojure/clojurescript.git
cd clojurescript
./script/bootstrap
In the same directory, clone and setup clojurescript-starter-kit
:
git clone [email protected]:brentonashworth/clojurescript-starter-kit.git
cd clojurescript-starter-kit
lein deps
If clojurescript
and clojurescript-starter-kit
are not located in the same directory then the CLOJURESCRIPT_HOME environment variable must be set.
From within the clojurescript-starter-kit
, the server may be run from the command line with ./script/run
and a properly classpathed Clojure REPL can be started with ./script/repl
. From the Clojure REPL, the server can be started by evaluating:
(use 'start.core)
(run-server)
A ClojureScript REPL can be started by evaluating:
(cljs-repl)
Entering :cljs/quit
in the ClojureScript REPL will stop this REPL and put you back in the Clojure REPL. In this way, one can quickly switch between the Clojure and ClojureScript REPL when working on the client and server portions of an application.
The ClojureScript REPL will evaluate forms in the running ClojureScript application and will not work until the REPL and browser have been connected. To connect, start the REPL and then open the ClojureScript application (click the Development button from the front page) or, if you are already there, refresh it. The ClojureScript REPL will only work when running the development version of the application. The design view does not do anything and the production view does not connect to the REPL.