|Brandon Wong 9fb9a2601a added some instructions and a personal link||1 year ago|
|dev||1 year ago|
|resources||1 year ago|
|src||1 year ago|
|.gitignore||1 year ago|
|README.md||1 year ago|
|karma.conf.js||1 year ago|
|package-lock.json||1 year ago|
|package.json||1 year ago|
|project.clj||1 year ago|
|shadow-cljs.edn||1 year ago|
A re-frame application designed to ... well, that part is up to you.
/: project config files
dev/: source files compiled only with the dev profile
resources/public/: SPA root directory; dev / prod profile depends on the most recent build
index.html: SPA home page
html <div id="app"></div>
lein clean(run by all
leinaliases before building)
js/compiled/: compiled CLJS (
src/cljs/microtables_frontend/: SPA source files (ClojureScript, re-frame)
core.cljs: contains the SPA entry point,
Use your preferred editor or IDE that supports Clojure/ClojureScript development. See Clojure tools for some popular options.
microtables-frontendproject root directory
sh lein deps && npm install
Browser caching should be disabled when developer tools are open to prevent interference with
shadow-cljs hot reloading.
Custom formatters must be enabled in the browser before CLJS DevTools can display ClojureScript data in the console in a more readable way.
Preferencesin the navigation menu on the left, if it is not already selected
Networkheading, enable the
Disable cache (while DevTools is open)option
Consoleheading, enable the
Enable custom formattersoption
Advanced settingsheading, enable the
Disable HTTP Cache (when toolbox is open)option
Unfortunately, Firefox does not yet support custom formatters in their devtools. For updates, follow the enhancement request in their bug tracker: 1262914 - Add support for Custom Formatters in devtools.
Start a temporary local web server, build the app with the
dev profile, and serve the app with
Please be patient; it may take over 20 seconds to see any output, and over 40 seconds to complete.
[:app] Build completed appears in the output, browse to
Opening the app in your browser starts a ClojureScript browser REPL, to which you may now connect.
Shadow CLJS User's Guide: Editor Integration.
lein dev runs
shadow-cljs watch for you, and that this project's running build id is
app, or the keyword
:app in a Clojure context.
Alternatively, search the web for info on connecting to a
shadow-cljs ClojureScript browser REPL
from your editor and configuration.
For example, in Vim / Neovim with
.cljsfile in the project to activate
Piggiebackcommand with this project's running build id,
vim :Piggieback :app
Connect to the
lein repl :connect localhost:8777
The REPL prompt,
shadow.user=>, indicates that is a Clojure REPL, not ClojureScript.
In the REPL, switch the session to this project's running build id,
The REPL prompt changes to
cljs.user=>, indicating that this is now a ClojureScript REPL.
user.cljs for symbols that are immediately accessible in the REPL
without needing to
See a list of
lein run -m shadow.cljs.devtools.cli --help
Please be patient; it may take over 10 seconds to see any output. Also note that some actions shown may not actually be supported, outputting "Unknown action." when run.
Run a shadow-cljs action on this project's build id (without the colon, just
lein run -m shadow.cljs.devtools.cli <action> app
debug? for logging or other tasks that should run only on
(ns microtables-frontend.example (:require [microtables-frontend.config :as config]) (when config/debug? (println "This message will appear in the browser console only on dev builds."))
Build the app with the
Please be patient; it may take over 15 seconds to see any output, and over 30 seconds to complete.
resources/public/js/compiled directory is created, containing the compiled
resources/public directory contains the complete, production web front
end of your app.
Always inspect the
resources/public/js/compiled directory prior to deploying the app. Running any
lein alias in this project after
lein dev will, at the very least, run
lein clean, which
deletes this generated directory. Further, running
lein dev will generate many, much larger
development versions of the files in this directory.