3 ms·
I'm still working out the kinks in the workflow. I believe it is possible to use Figwheel while writing browser extensions [0], but I haven't set that up. I hav
by jdormit 9y ago
I'm still working out the kinks in the workflow. I believe it is possible to use Figwheel while writing browser extensions [0], but I haven't set that up. I have `lein cljsbuild auto` running in the background to automatically recompile the JS when I change the source code, and use Mozilla's web-ext utility [1] to automatically reload the web extension once the JS has compiled.
This system has some disadvantages, though. The main one is the glacial feedback loop - due to strict CSP restrictions in web extensions, I had trouble compiling the CLJS with {:optimizations :none}, so each save-compile-reload cycle takes ~30 seconds from when I save the source file to when I see the results of the change in the browser. I also did not figure out how to set up a REPL environment connected to the code running in the web extension.
Lots of room for improvement here, basically.
[0]: https://github.com/binaryage/chromex-sample#chromex-sample-project-has-following-configuration https://github.com/binaryage/chromex-sample#chromex-sample-p...
[1]: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Getting_started_with_web-ext https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Ge...