Luminus directories: src/clj, src/cljs, src/cljc

When you use the lein plugin luminus to create a web application based on the Luminus Web Stack, it creates three directories under src: clj, cljs, and cljc.

What are these for?

.clj is for Clojure code; the Server component of your application

.cljs if explicitly for ClojureScript code; it automatically hooks up with the Javascript runtime.

.cljc is for Shared Code that may use Reader Conditionals to express the differences between Clojure code and ClojureScript code.

TS;RM:

  • Reader conditionals are Only supported in files with the .cljc extention
  • In other words, that tailing “c” means “Conditionals are Supported”

Leave a Reply