clojurescript
Clojure to JS compiler
A compiler that translates Clojure code into JavaScript, letting developers write the same language for both their server-side Java backend and their browser frontend instead of switching between two languages.
ClojureScript is a compiler that translates Clojure code into JavaScript. Clojure is a programming language that runs on the Java Virtual Machine and is part of the Lisp family. ClojureScript lets developers write in the same language on the server side (where Clojure runs) and also produce JavaScript for the browser or other JavaScript environments, without switching languages.
The compiler is designed to produce JavaScript that works well with Google Closure Compiler's advanced optimization mode. That optimizer can significantly shrink the size of JavaScript output, which matters for web pages where download size affects load speed.
ClojureScript is added to a project as a library dependency. The README lists the dependency coordinates for three common build tools in the Clojure ecosystem: Clojure's built-in deps.edn format, Leiningen, and Maven. After that, developers follow the official Quick Start guide on the project's website to set up their first project.
Support and discussion happen through the Clojure mailing list, a dedicated ClojureScript user mailing list, a Slack workspace, and an IRC channel. Bug reports and feature requests go through the project's Jira instance. Contributors need to sign a Contributor Agreement and submit changes through the official channels documented on clojure.org.
The project is maintained by the same team behind Clojure and is licensed under the Eclipse Public License 1.0.
Where it fits
- Write browser UI code in Clojure so you can share data types and logic between your JVM backend and frontend
- Compile a Clojure web app down to highly optimized JavaScript using Google Closure Compiler's advanced mode
- Build a full-stack application in a single language with shared code between server and browser