aboutsummaryrefslogtreecommitdiff
path: root/clojurescript/README.txt
blob: a87a7baa0ace995f9cf78af0a04969e3fa3faaf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
This directory contains work in progress on what may eventually become
ClojureScript.  It currently allows code written in a very small
subset of Clojure to be automatically translated to JavaScript.

tojs.clj is Clojure code to translate Clojure forms to Javascript.  It
was used to generate core.js from clojure's own core.clj and
core_print.clj.

To run any of the tests from the command line, do something like:

java -cp ~/build/clojure/clojure.jar:/home/chouser/proj/clojure-contrib/src:src \
  clojure.main src/clojure/contrib/clojurescript/cli.clj -- \
  tests/t03.cljs > t03.js

Now that you've got the .js file, you can test using Rhino:

/usr/bin/java -jar /usr/share/java/js.jar \
  -f src/clojure/contrib/clojurescript/rt.js \
  -f src/clojure/contrib/clojurescript/core.js \
  -f t03.js

To build the applet from the compiled .class files, don't forget to:

- Extract clojure code into the classes dir
  (cd classes; jar -x < ~/build/clojure/clojure.jar)
- Produce the jar:
  jar cmf MANIFEST.MF clojurescript-applet.jar -C classes .

There's plenty more to do.  If you'd like to help, contact the Clojure
Google group: clojure@googlegroups.com

--Chouser
12 Jan 2009