An engine for Paradise that maps the spec of Matrix to the modular main client. This enables Paradise to be a Matrix client, and so much more.
Currently, the best way to develop for and test can seem rather clunky. However, since the dev mode for CLJS doesn’t do dead code elimination we end up with some problematic entries in the created bundle file. So instead, when developing for the engine it is FAR easier to simply point a module in the client repo directory that you have locally (or should) and then launch the client.
Changes in the engine repo will trigger a re-compilation, so the overall experience from that point should be smooth. Just a bit of set-up to get started.
Inside the Paradise client repo shadow-cljs.edn place this next to the other modules:
:engine-matrix {:entries [paradise.engine.matrix.core]
:web-worker true
:depends-on #{:engine}
:exports {init paradise.engine.matrix.core/bootstrap}
}
Inside the Paradise client deps.edn add the following next to the other dependencies:
paradise/matrix-engine {:local/root "../Matrix-Engine"}
Now the actual dev endpoint needs to be shifted from the prod end point. For context, it is left there as is under the assumption that most of the time adjusting the engine will be unnecessary.
Dev/Prod impacts the CLIENT’s running execution (so a hosted release). Dev is what you’d want in almost all cases.
Inside the Paradise client config.edn:
"matrix" {:dev "https://paradise-chat.github.io/Matrix-Engine/plugin.js", :prod "https://paradise-chat.github.io/Matrix-Engine/plugin.js"}
to
"matrix" {:dev "http://localhost:8082/plugin.js", :prod "https://paradise-chat.github.io/Matrix-Engine/plugin.js"}
Notes for myself: guix shell -C -N -F –share=$HOME/Code -m ./manifest.scm
Testing local: npx http-server dist –cors -p 8082 -c-1