Brandon Wong e51266610b fix :infer-warning on isSymbolNode property access in parse-variables 2 週間 前
..
dev 2ebca8839b added empty reframe frontend 6 年 前
resources a3d72d3e2e add sticky row and column headers to the spreadsheet table 3 週間 前
src e51266610b fix :infer-warning on isSymbolNode property access in parse-variables 2 週間 前
test 023884242b move tests from src/test/ to top-level test/ to match shadow-cljs convention 2 週間 前
.gitignore d35ce2e688 updating project 1 年間 前
README.md 023884242b move tests from src/test/ to top-level test/ to match shadow-cljs convention 2 週間 前
karma.conf.js 2ebca8839b added empty reframe frontend 6 年 前
package-lock.json 1d63b2f925 build: replace Leiningen with shadow-cljs standalone 3 週間 前
package.json e483e06fbd add cljs.test unit and integration tests via shadow-cljs node-test target 2 週間 前
shadow-cljs.edn 023884242b move tests from src/test/ to top-level test/ to match shadow-cljs convention 2 週間 前

README.md

microtables-frontend

A re-frame ClojureScript single-page application.

Project Overview

Directory structure

Environment Setup

  1. Install JDK 11 or later
  2. Install Node.js
  3. Clone this repo and open a terminal in the frontend directory
  4. Install dependencies: sh npm install

Browser Setup

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.

Development

Running the App

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.

Connecting to the browser REPL from your editor

See Shadow CLJS User's Guide: Editor Integration. The running build id is app (:app in a Clojure context).

Connecting to the browser REPL from a terminal

  1. Connect to the nREPL (port 8777, configured in 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)

Debug Logging

The debug? variable in config.cljs defaults to true in dev builds and false in prod builds.

Testing

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

Production

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.