{"id":13491379,"url":"https://github.com/thheller/shadow-cljs","last_synced_at":"2025-12-12T01:06:25.298Z","repository":{"id":37413008,"uuid":"43973779","full_name":"thheller/shadow-cljs","owner":"thheller","description":"ClojureScript compilation made easy","archived":false,"fork":false,"pushed_at":"2025-05-07T15:04:52.000Z","size":9355,"stargazers_count":2315,"open_issues_count":37,"forks_count":179,"subscribers_count":40,"default_branch":"master","last_synced_at":"2025-05-08T17:03:36.666Z","etag":null,"topics":["cljs","clojurescript","hot-reload","repl"],"latest_commit_sha":null,"homepage":"https://github.com/thheller/shadow-cljs","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thheller.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"thheller","patreon":"thheller","open_collective":null,"ko_fi":null,"tidelift":null,"custom":["https://getalby.com/p/thheller","https://www.paypal.me/thheller"]}},"created_at":"2015-10-09T18:44:09.000Z","updated_at":"2025-05-07T15:04:58.000Z","dependencies_parsed_at":"2023-07-20T06:53:53.087Z","dependency_job_id":"fdebec26-951b-497a-a482-062830b6e86f","html_url":"https://github.com/thheller/shadow-cljs","commit_stats":{"total_commits":3148,"total_committers":64,"mean_commits":49.1875,"dds":"0.041931385006353294","last_synced_commit":"e7f9db03687af10fe983f0bfec6b537fa9623cb5"},"previous_names":["thheller/shadow-devtools"],"tags_count":354,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thheller%2Fshadow-cljs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thheller%2Fshadow-cljs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thheller%2Fshadow-cljs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thheller%2Fshadow-cljs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thheller","download_url":"https://codeload.github.com/thheller/shadow-cljs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253112073,"owners_count":21856070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cljs","clojurescript","hot-reload","repl"],"created_at":"2024-07-31T19:00:56.320Z","updated_at":"2025-12-12T01:06:25.184Z","avatar_url":"https://github.com/thheller.png","language":"Clojure","funding_links":["https://github.com/sponsors/thheller","https://patreon.com/thheller","https://getalby.com/p/thheller","https://www.paypal.me/thheller"],"categories":["Clojure","Build Automation and Package management","others","Awesome ClojureScript"],"sub_categories":["Development"],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/thheller/shadow-cljs/master/src/main/shadow/cljs/devtools/server/web/resources/img/shadow-cljs.png\" width=\"120\" height=\"120\" align=\"right\"/\u003e\n\n\n[![](https://img.shields.io/badge/Clojurians-shadow--cljs-lightgrey.svg)](https://clojurians.slack.com/messages/C6N245JGG/)\n[![npm](https://img.shields.io/npm/v/shadow-cljs.svg)](https://github.com/thheller/shadow-cljs)\n[![Clojars Project](https://img.shields.io/clojars/v/thheller/shadow-cljs.svg)](https://clojars.org/thheller/shadow-cljs)\n\n`shadow-cljs` provides everything you need to compile your ClojureScript code with a focus on simplicity and ease of use.\n\n### [User's Guide](https://shadow-cljs.github.io/docs/UsersGuide.html) | [Quick Start](#quick-start) | [Tutorials](#video-courses) | [Browser Extension](https://github.com/thheller/shadow-cljs-ext)\n\n## Features\n\n- Good configuration defaults so you don't have to sweat the details\n- Seamless `npm` integration\n- Fast builds, reliable caching, ...\n- Supporting various targets `:browser`, `:node-script`, `:npm-module`, `:react-native`, `:chrome-extension`, ...\n- Live Reload (CLJS + CSS)\n- CLJS REPL\n- Code splitting (via `:modules`)\n\n![overview-img](https://user-images.githubusercontent.com/116838/28730426-d32dc74a-7395-11e7-9cec-54275af35345.png)\n\n## Requirements\n\n- [Node.js](https://nodejs.org) or [Bun](https://bun.sh)\n- [npm](https://www.npmjs.com) (comes with Node.js), [bun](https://bun.sh) (comes with Bun), [pnpm](https://pnpm.io), or [yarn](https://www.yarnpkg.com)\n- [Java SDK](https://adoptium.net/) (Version 21+, Latest LTS Version recommended)\n\n## Quick Start\n\nCreating your project can be done quickly using the `npx create-cljs-project` utility. `npx` is part of `npm` and lets us run utility scripts quickly without worrying about installing them first. The installer will create a basic project scaffold and install the latest version of `shadow-cljs` in the project.\n\n```bash\n$ npx create-cljs-project acme-app\nnpx: installed 1 in 5.887s\nshadow-cljs - creating project: .../acme-app\nCreating: .../acme-app/package.json\nCreating: .../acme-app/shadow-cljs.edn\nCreating: .../acme-app/.gitignore\nCreating: .../acme-app/src/main\nCreating: .../acme-app/src/test\n----\nInstalling shadow-cljs in project.\n\nnpm notice created a lockfile as package-lock.json. You should commit this file.\n+ shadow-cljs@\u003cversion\u003e\nadded 88 packages from 103 contributors and audited 636 packages in 6.287s\nfound 0 vulnerabilities\n\n----\nDone.\n----\n```\n\nThe resulting project has the following structure\n\n```bash\n.\n├── node_modules (omitted ...)\n├── package.json\n├── package-lock.json\n├── shadow-cljs.edn\n└── src\n    ├── main\n    └── test\n```\n\n`shadow-cljs.edn` will be used to configure your CLJS builds and CLJS dependencies. `package.json` is used by `npm` to manage JS dependencies.\n\nEverything is ready to go if you just want to start playing with a REPL\n\n```bash\n$ npx shadow-cljs node-repl\n# or\n$ npx shadow-cljs browser-repl\n```\n\nWhen building actual projects we need to configure the build first and create at least one source file.\n\nThe default source paths are configured to use `src/main` as the primary source directory. It is recommended to follow the [Java Naming Conventions](https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html) to organize your CLJS namespaces. It is recommended to start all namespaces with a unique enough prefix (eg. company name, project name) to avoid conflicts with generic names such as `app.core`. Suppose you were building a Web Frontend for [Acme Inc.](https://en.wikipedia.org/wiki/Acme_Corporation) using `acme.frontend.app` might be a good starting point as it can easily grow to include `acme.backend.*` later on.\n\nUsing the above example the expected filename for `acme.frontend.app` is `src/main/acme/frontend/app.cljs`.\n\nLets start with a simple example for a browser-based build.\n\n```clojure\n(ns acme.frontend.app)\n\n(defn init []\n  (println \"Hello World\"))\n```\n\nInside the `shadow-cljs.edn` `:builds` section add\n\n```clojure\n{...\n :builds\n {:frontend\n  {:target :browser\n   :modules {:main {:init-fn acme.frontend.app/init}}\n   }}}\n```\n\nThis config tells the compiler to call `(acme.frontend.app/init)` when the generated JS code is loaded. Since no `:output-dir` is configured the default `public/js` is used. You can start the development process by running:\n\n```bash\n$ npx shadow-cljs watch frontend\n...\na few moments later ...\n...\n[:frontend] Build completed. (134 files, 35 compiled, 0 warnings, 5.80s)\n```\n\nThe compilation will create the `public/js/main.js` we configured above (`:main` becomes `main.js` in the `:output-dir`). Since we want to load this in the browser we need to create a HTML file in `public/index.html`.\n\n```html\n\u003c!doctype html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\" /\u003e\n    \u003ctitle\u003eacme frontend\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv id=\"root\"\u003e\u003c/div\u003e\n    \u003cscript src=\"/js/main.js\"\u003e\u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nWe also need a simple HTTP server to serve our HTML since modern Browsers all place a few restrictions on files loaded directly from disk which will lead to issues later. `shadow-cljs` provides such a server but you can use anything you like at this point. It only matters that the files from the `public` directory are served properly. To start the built-in web server just adjust the build config from above.\n\n```clojure\n{...\n :dev-http {8080 \"public\"}\n :builds\n {:frontend\n  {:target :browser\n   :modules {:main {:init-fn acme.frontend.app/init}}\n   }}}\n```\n\nOnce the config is saved the server will automatically start and serve the content at http://localhost:8080. There is no need to restart `shadow-cljs`. When opening the above URL the Browser Console should show \"Hello World\".\n\n\nTo be continued ...\n\n## Documentation\n\nPlease refer to the [User Manual](https://shadow-cljs.github.io/docs/UsersGuide.html). (Work in Progress)\n\n## Video Courses\n\n- [EN] [Learn Reagent Free](https://www.jacekschae.com/learn-reagent-free/uk29i?coupon=SHADOW) - [reagent](https://github.com/reagent-project/reagent)+[firebase](https://firebase.google.com/) demo application built using shadow-cljs\n- [EN] [Learn Reagent Pro](https://www.jacekschae.com/learn-reagent-pro/uk29i?coupon=SHADOW) [Affiliate Link, 30$ discount] - [reagent](https://github.com/reagent-project/reagent)+[firebase](https://firebase.google.com/) demo application built using shadow-cljs\n- [EN] [Learn re-frame](https://www.learnreframe.com/?ref=uk29i) [Affiliate Link] - re-frame SPA tutorial\n- [EN] [ClojureScript for React Developer - Building Conduit](https://www.youtube.com/watch?v=EUdsLZUsiRQ\u0026list=PLUGfdBfjve9VGzp7G1C9FYfH8Yk1Px-11)\n\n## Guides\n\n- [EN] [A beginner guide to compile ClojureScript with shadow-cljs](https://medium.com/@jiyinyiyong/a-beginner-guide-to-compile-clojurescript-with-shadow-cljs-26369190b786)\n- [CN] [shadow-cljs 2.x 使用教程](https://segmentfault.com/a/1190000011499210)\n- [JA] [Shadow CLJS User’s Guide 邦訳](https://t-cool.github.io/shadow-cljs-users-guide-ja/docs/UsersGuide.html)\n- [EN] [ClojureScript with Middleman via Shadow-CLJS](http://bobnadler.com/articles/2018/01/28/clojurescript-with-middleman-via-shadow-cljs.html)\n- [EN] [Clojurescript Development for JavaScript Developers in Atom with Shadow-cljs and ProtoREPL](https://medium.com/@loganpowell/clojurescript-development-for-javascript-developers-in-atom-with-shadow-cljs-and-protorepl-ec5e38e3de26)\n- [EN] [Confidence and Joy: React Native Development with ClojureScript and re-frame](https://hackmd.io/@byc70E6fQy67hPMN0WM9_A/rJilnJxE8)\n- ... please let me know if you created something to include here\n\n## Examples\n\n- [Official Browser Example](https://github.com/shadow-cljs/quickstart-browser)\n- [re-frame-template](https://github.com/day8/re-frame-template) -  Leiningen template that creates a [re-frame](https://github.com/Day8/re-frame) project using the [shadow-cljs](https://github.com/thheller/shadow-cljs/) build tool with many optional extras.\n- [mhuebert/shadow-re-frame](https://github.com/mhuebert/shadow-re-frame) - Usage of [re-frame](https://github.com/Day8/re-frame), [re-frame-trace](https://github.com/Day8/re-frame-trace), and the [shadow-cljs](https://github.com/thheller/shadow-cljs/) build tool. **[Live Demo](https://mhuebert.github.io/shadow-re-frame/)**\n- [jacekschae/shadow-reagent](https://github.com/jacekschae/shadow-reagent) - shadow-cljs + proto-repl + reagent\n- [jacekschae/shadow-firebase](https://github.com/jacekschae/shadow-firebase) - shadow-cljs + firebase\n- [ahonn/shadow-electron-starter](https://github.com/ahonn/shadow-electorn-starter) - ClojureScript + Shadow-cljs + Electron + Reagent\n- [jacekschae/conduit](https://github.com/jacekschae/conduit) - Real world application built with shadow-cljs + re-frame + re-frame-10x \u003cbr\u003e [Demo](https://jacekschae.github.io/conduit-re-frame-demo/) | [Demo with re-frame-10x](https://jacekschae.github.io/conduit-re-frame-10x-demo/)\n- [quangv/shadow-re-frame-simple-example](https://github.com/quangv/shadow-re-frame-simple-example) - a simple re-frame + shadow-cljs example.\n- [CryptoTwittos](https://github.com/teawaterwire/cryptotwittos) - reagent, re-frame, web3\n- [loganpowell/shadow-proto-starter](https://github.com/loganpowell/shadow-proto-starter) - shadow-cljs, Atom, Proto-REPL, node.js library\n- [manuel-uberti/boodle](https://sr.ht/~manuel-uberti/boodle/) - re-frame based Accounting SPA with `deps.edn` based backend\n- [shadow-cljs-kitchen-async-puppeteer](https://github.com/iku000888/shadow-cljs-kitchen-async-puppeteer) - Automated browser test with puppeteer and cljs.test, built with shadow-cljs\n- [baskeboler/cljs-karaoke-client](https://github.com/baskeboler/cljs-karaoke-client) - web karaoke player using shadow-cljs + reagent + re-frame + re-frame-10x + re-frame-async-flow-fx + build hooks for minifying css and generating seo pages ([Demo](https://karaoke-player.netlify.app/songs/Rolling%20Stones-all%20over%20now%20rolling%20stones.html))\n- [flexsurfer/ClojureRNProject](https://github.com/flexsurfer/ClojureRNProject) - simple React Native application with ClojureScript, re-frame and react navigation v5\n- [jacekschae/shadow-cljs-devcards](https://github.com/jacekschae/shadow-cljs-devcards) - how to configure devcards with shadow-cljs\n- [jacekschae/shadow-cljs-tailwindcss](https://github.com/jacekschae/shadow-cljs-tailwindcss) - shadow-cljs + tailwindcss-jit setup\n- [ertugrulcetin/racing-game-cljs](https://github.com/ertugrulcetin/racing-game-cljs) - A 3D racing game built with ClojureScript, React and ThreeJS\n- [prestancedesign/pingcrm-clojure](https://github.com/prestancedesign/pingcrm-clojure) - A full stack SPA application built with Clojure + ClojureScript to illustrate how Inertia.js works.\n- ... please let me know if you created something to include here\n\n## Libraries\n- [flexsurfer/rn-shadow-steroid](https://github.com/flexsurfer/rn-shadow-steroid) - React Native with shadow-cljs on steroids\n- [re-frame-flow](https://github.com/ertugrulcetin/re-frame-flow) - A graph based visualization tool for re-frame event chains using shadow-cljs\n- ... please let me know if you created something to include here\n\n## License\n\nCopyright © 2024 Thomas Heller\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthheller%2Fshadow-cljs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthheller%2Fshadow-cljs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthheller%2Fshadow-cljs/lists"}