This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-25
Channels
- # announcements (1)
- # beginners (131)
- # cljs-dev (1)
- # clojure (178)
- # clojure-argentina (1)
- # clojure-dev (3)
- # clojure-uk (2)
- # clojuredesign-podcast (1)
- # clojurescript (16)
- # code-reviews (2)
- # core-async (2)
- # emacs (28)
- # figwheel-main (19)
- # fulcro (11)
- # kaocha (1)
- # leiningen (4)
- # music (6)
- # off-topic (2)
- # re-frame (2)
- # reitit (6)
- # rewrite-clj (9)
- # shadow-cljs (78)
- # slack-help (6)
@U09LZR36F do you mean this? https://github.com/pedestal/pedestal/blob/master/service-tools/src/io/pedestal/service_tools/dev.clj#L23
@dimovich @thiru0130 thanks
Hi Guys, has anyone experimented with setting up electronjs
with figwheel-main
- it'd be nice if you could share a link or some guidance here 🙂
I have an electron app with shadow-cljs, if you need any help :)
Thank! Yeah, would be great is you could point me to it and I'll go through it
Ok, what I did was to create a JS project that would only load the Electron env, and activate node integration: https://github.com/mauricioszabo/repl-tooling/blob/master/integration.js Then I've configured a browser target: https://github.com/mauricioszabo/repl-tooling/blob/master/shadow-cljs.edn.
When I need to require things, I've used (js/require "my-dependency")
for example. There's a configuration for shadow-cljs to resolve these things to you so you can use the namespace format too
For example, you can configure a :browser target and add the configuration :js-options {:js-provider :require}
inside the browser target, so it'll emit require(...)
commands on the JS side
Hmm, this seems nice @U3Y18N0UC thanks for taking the time to look into it man 👍 ! Let me explore this direction more over the weekend.
@abhi18av I am no expert, but it seems shadow-cljs may be easier for combining electronjs
and ClojureScript.
I saw a few figwheel related articles when googling cljsjs electron
. Cljsjs doesn't seem to have electron, but it sounds like someone has packaged electron up as a foreign lib with externs themselves.
Thanks @U05254DQM!
I do like shadow-cljs
as well, but have not been successful in setting up spacemacs properly with it in the past. I would love to have this same experience for development with shadow-cljs
like figwheel
provides
Ah yes, looking through https://shadow-cljs.github.io/docs/UsersGuide.html there is quite a bit to set up. I wonder if anyone has created a project template. I am interested in setting up shadow-cljs with the Clojure CLI tools (deps.edn) and getting that to all run from CIDER. I'll try find a day to work on that but it will be after my charity ride (so late September).
If you can find a working electron via Cljsjs, that should be easier, just adding it as a dependency to your figwheel project. You may want to avoid advanced compilation if you are getting a lot of errors.
There is a new article about shadow-cljs that looks interesting https://code.thheller.com/blog/shadow-cljs/2019/08/25/hot-reload-in-clojurescript.html
Thanks for always being so helpful @U05254DQM 😊 ! Let me give some time to this setup sometime this week and circle back to you on the progress, the article does clear out a few doubts I had about the reloadable code, which is ideally what we want in the electron-cljs
workflow as well