This project is to test direct interaction between Preact and ClojureScript — specifically avoiding the use of any framework.
The intend is to create a single component and attach it to a test page with minimum code.
ClojureScript is compiled with the excellent Google Closure Compiler. The build tool I am using is Leiningen. I integrated Figwheel to make testing easy.
To run the example, execute:
$ lein figwheel
from a shell, wait for the code to compile, and point a browser to localhost:3450/index.html. The “Hello World!“ text should be displayed below the “Test root div“ showing that the Preact component loaded successfully.
On macOS, assuming that Homebrew is installed; and Java has been installed as well (entering java
in the Terminal gives a link on how to install the Oracle JDK): you should only need to run brew install leiningen
to get the build script. The project will automatically downloads the various JARs it depends on.
The example is released under the Apache License 2.0.