|
|
2 weken geleden | |
|---|---|---|
| .. | ||
| dev | 6 jaren geleden | |
| resources | 3 weken geleden | |
| src | 2 weken geleden | |
| test | 2 weken geleden | |
| .gitignore | 1 jaar geleden | |
| README.md | 2 weken geleden | |
| karma.conf.js | 6 jaren geleden | |
| package-lock.json | 3 weken geleden | |
| package.json | 2 weken geleden | |
| shadow-cljs.edn | 2 weken geleden | |
A re-frame ClojureScript single-page application.
shadow-cljs/: project config filesdev/: source files available only during development
cljs/user.cljs: symbols for use during development in the ClojureScript REPLresources/public/: SPA root directory
index.html: SPA home pagejs/compiled/: compiled CLJS output (not tracked in source control)src/cljs/microtables_frontend/: SPA source filesfrontend directorysh
npm install
Disable browser caching when developer tools are open to prevent interference with hot reloading.
Enable custom formatters in Chrome/Chromium DevTools (Settings → Preferences → Console → Enable custom formatters) so that CLJS DevTools can display ClojureScript data readably in the console.
npm run dev
When [:app] Build completed appears in the output, browse to http://localhost:8280/.
shadow-cljs will automatically push ClojureScript code changes to your browser on save. See Hot Reload in ClojureScript: Things to avoid for common pitfalls.
See Shadow CLJS User's Guide: Editor Integration. The running build id is app (:app in a Clojure context).
shadow-cljs.edn):
sh
npx shadow-cljs cljs-repl app
Or connect with your editor's nREPL client to localhost:8777, then:
clj
(shadow.cljs.devtools.api/nrepl-select :app)
The debug? variable in config.cljs defaults to true in dev builds and false in prod builds.
Unit and integration tests live in test/microtables_frontend/ and use cljs.test compiled to Node.js via a shadow-cljs :node-test target.
npm test
This compiles the :test build and runs it with Node.js. No browser is required.
| File | What it covers |
|---|---|
evaluation_test.cljs |
Formula evaluation engine — arithmetic, cell/range references, cycle detection, error propagation |
events_test.cljs |
State-transition pipelines — downstream re-evaluation, dirty marking, reference graph updates |
npm run prod
The resources/public/js/compiled directory will contain the compiled app.js and manifest.edn files. The resources/public/ directory is the complete production web front end.