{"library":"shadow-cljs","title":"shadow-cljs","description":"shadow-cljs is a comprehensive ClojureScript compiler and JavaScript bundler that simplifies the development workflow for ClojureScript projects. It offers fast incremental compilation, robust hot-reloading for both ClojureScript and CSS, and seamless integration with the broader JavaScript ecosystem, including npm packages and various build targets (e.g., browser, Node.js, React Native, Chrome extensions). The current stable version is 3.4.4, with point releases occurring frequently to address bugs and introduce minor features, ensuring an active and responsive development cycle. A key differentiator is its focus on providing sensible defaults and abstracting away complex configurations, offering a highly optimized developer experience for both development and release builds, particularly for projects heavily utilizing npm dependencies, contrasting with tools like Figwheel-main which are often preferred for purely ClojureScript projects.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install shadow-cljs"],"cli":{"name":"shadow-cljs","version":null}},"imports":["npx shadow-cljs <command>","(shadow.cljs.devtools.api/compile :app)"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"npx create-cljs-project my-app\ncd my-app\n\n# --- shadow-cljs.edn content (create this file) ---\n# {:source-paths [\"src/main\"]\n#  :dependencies []\n#  :builds {:app {:target :browser\n#                 :output-dir \"resources/public/js\"\n#                 :asset-path \"/js\"\n#                 :modules {:app {:init-fn my-app.core/init!}}\n#                 :compiler-options {:optimizations :simple}}}}\n# -----------------------------------------------------\n\n# --- src/main/my_app/core.cljs content (create this file) ---\n# (ns my-app.core\n#   (:require [reagent.core :as r]))\n#\n# (defn hello-world []\n#   [:div \"Hello from ClojureScript!\"])\n#\n# (defn init! []\n#   (r/render [hello-world] (js/document.getElementById \"app\")))\n# -----------------------------------------------------------------\n\n# Add 'dev' and 'release' scripts to your package.json:\n# \"scripts\": {\n#   \"dev\": \"shadow-cljs watch app\",\n#   \"release\": \"shadow-cljs release app\"\n# }\n\n# Install React and ReactDOM as npm dependencies (common for Reagent projects)\nnpm install react react-dom\n\n# Start the development watcher and built-in HTTP server\nnpm run dev\n\n# Once compiled, access your app at http://localhost:8020/ (default shadow-cljs dev server port).\n# Remember to create a public/index.html file to load your compiled JavaScript.","lang":"typescript","description":"Demonstrates how to scaffold a new shadow-cljs project, configure a basic browser build, create a sample ClojureScript application with Reagent, and run the development watcher.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}