How to Set Up Shadow CLJS

kelvinmai

Kelvin Mai

Posted on July 6, 2020

How to Set Up Shadow CLJS

This is a simple walkthrough of how to set up a shadow cljs project

Included in video

  • Configuring a shadow-cljs edn file
  • Adding clojurescript support in the chrome console
  • Adding CLJS/JS dependencies and interoping with existing Javascript libraries

The completed shadow-cljs.edn file will look like this

{:source-paths ["src/cljs"]
 :nrepl {:port 9000}
 :dependencies [[cider/cider-nrepl "0.21.0"]
                [binaryage/devtools "1.0.2"]
                [lilactown/helix "0.0.13"]]
 :builds {:app {:target :browser
                :output-dir "resources/public/js"
                :modules {:main {:init-fn app.core/init}}
                :devtools {:preloads [devtools.preload]
                           :http-root "resources/public"
                           :http-port 3000}}}}

Resource Links

Shadow CLJS
Shadow CLJS Docs
Lokeh/helix

Follow and support me

💖 💪 🙅 🚩
kelvinmai
Kelvin Mai

Posted on July 6, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

From loop recur to reduce
clojure From loop recur to reduce

December 28, 2021

Introduction to Clojure Ring
clojure Introduction to Clojure Ring

July 10, 2020

How to Set Up Shadow CLJS
clojure How to Set Up Shadow CLJS

July 6, 2020

Clojure 101 / destructuring
clojure Clojure 101 / destructuring

July 4, 2020

Clojure 101 / ! and ?
clojure Clojure 101 / ! and ?

July 4, 2020