|
|
il y a 3 semaines | |
|---|---|---|
| .. | ||
| dev | il y a 6 ans | |
| resources | il y a 6 ans | |
| src | il y a 1 an | |
| .gitignore | il y a 1 an | |
| README.md | il y a 3 semaines | |
| karma.conf.js | il y a 6 ans | |
| package-lock.json | il y a 3 semaines | |
| package.json | il y a 3 semaines | |
| shadow-cljs.edn | il y a 3 semaines | |
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.
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.