# Shadow cljs Build Tool
# What is shadow-cljs
Most of our app configuration are going to live under showodcljs-edn
file
- not a fork but a different build tool build on top of cljs compiler
- Helps you use regular
npm
packages and modules - replacement for cljs build and figwheel
- All
npm
imports as string
(ns app.frontend
(:require [reagent.core :as r]
["@smooth-ui/core-sc" :refer [Normalize]]))
Use best of both clojure
and javascript
worlds
npx create-cljs-project app-name
npx shadow-cljs node-repl
npx shadow-cljs browser-repl
npx shadow-cljs watch frontend
compile, watch and release
# How it works ?
:asset-path
is realtive to:output-dir
- modules configure how the compiled sources are bundled together and how the final .js are generated. Usually we call a
:init-fn
inside it. - Code splitting (opens new window) is done via multiple
:modules
- Add external
js
usingextern
compiler-option
- Giant 6.3M
js/main.js
file
How to use npm packages inside shadow-cljs?
← 📚 Vue.js