This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-23
Channels
- # aws (2)
- # beginners (57)
- # boot (63)
- # cider (7)
- # clara (1)
- # cljs-dev (1)
- # cljsrn (5)
- # clojure (68)
- # clojure-brasil (1)
- # clojure-dusseldorf (2)
- # clojure-greece (10)
- # clojure-italy (29)
- # clojure-russia (1)
- # clojure-spec (9)
- # clojure-uk (66)
- # clojurescript (16)
- # cursive (18)
- # datomic (19)
- # docker (3)
- # figwheel (2)
- # fulcro (61)
- # instaparse (7)
- # jobs (1)
- # luminus (5)
- # lumo (47)
- # mount (6)
- # off-topic (13)
- # onyx (39)
- # planck (4)
- # portkey (2)
- # re-frame (28)
- # ring (6)
- # ring-swagger (30)
- # rum (3)
- # shadow-cljs (142)
- # spacemacs (5)
- # sql (2)
- # unrepl (61)
- # untangled (2)
@yannvahalewyn Are you using figwheel for hot reloading js in the browser?
I use figwheel-sidecar (as a system)
I managed to figure out what was wrong in my case and offered a PR: https://github.com/boot-clj/boot/pull/663
tldr: I need figwheel build stuff (lots of files) in a resource dir to be available by my dev server, and boot watches and syncs of all those files to the tempdirs.
@yannvahalewyn Ah, a fellow Dutchman. Feel welcome to join #clojure-nl as well.
Actually Belgian living in NL now 🙂. thanks for the welcome!
@yannvahalewyn Might be worth sharing your setup, as this seems very similar to the problems that these people had: https://clojureverse.org/t/migrating-from-boot-back-to-leiningen/837
I read that during my research 🙂
What part of the setup would be interesting?
I’m currently migrating from lein to boot, it’s all open here: https://github.com/yannvanhalewyn/sheet-bucket/tree/boot
I don’t do that 🙂
But basically I have a dev system https://github.com/stuartsierra/component which has a figwheel component. Flow is like this:
- start repl
- run a command to build and start the dev system (eg (go)
)
- The database starts, web server, sockets etc.. and figwheel component starts building the cljs https://github.com/yannvanhalewyn/sheet-bucket/blob/boot/env/dev/clj/dev.clj
- cljs files end up in a resource dir because they are served up by the web component
- boot’s watchers watch those and syncs them over to tempdirs (which I have no need for)
btw: solved for now by using boot --disable-watchers dev repl
> boot’s watchers watch those and syncs them over to tempdirs (which I have no need for) that’s the part I meant
allright 🙂. Well I don’t have any setup for that, it just happens. Hence the bootignore PR
Isn’t it more idiomatic to stream it to target btw, instead of resources? I consider resources immutable, but maybe that’s something I imagined on my own
I get that indeed, those are not app resources but dev resources
the thing is in figwheel world that those need to be served up, so I need them on the resource path for the webserver. Is there another way?
I think dev resources is reserved for assets you use in tests etc, not something to write into, but again, I might have made this up myself at some point 🙂
hmm, not sure. Pretty new to all this must admit. I’ll try that real quick
In my view, target is a directory you can always throw away and rebuild, where resources/dev-resources contain html etc.
I share that view
wow, you might be right that you can access resources from the target path..
I’m not sure if boot supports writing into target and then picking it up as input, because that’s a two way view of target, I never tested it myself
oh wait, those where left over resources from my lein build. Trying again 🙂
what do you mean by that last part?
Turns out you can’t read files from the target path as a resource
So I couldn’t serve build cljs files from there in development
yes, indeed
but I guess you can make a directory “fig-target”, write there from figwheel and at this to the resources-path
in my case however there is no last step, as in: figwheel builds at runtime after the repl started (end of the line for boot)
That would result in the same problem
That’s actually what I do btw
I write to target/public/js/compiled/**/*.js
And serve that public directory
But it’s circular, since boot will watch that resource path I’m back to the FSEvent dropouts halas.
yeah, this wasn’t a solution to your github issue, just wondering if you wrote to /resources/…, anyway I’m blathering
and :resource-paths #{"target" "resources"}
that’s the details, but indeed I don’t want to merge my app resources and “target resources” 🙂
I completely agree on that part 😉
did we meet actually two years ago? On a JS meetup where you did a talk on React ❤️ cljs?
Utrecht
ClojureScript ❤️ React I think? https://github.com/borkdude/domcode-cljs-react/blob/master/slides/domcode-may-26-2015.pdf
Oh yeah!
Makes sense, haha
I was the “new guy”, just started learning programming few months earlier. Didn’t know anything about react and clojure, but you got me into it 🙂
yeah, so thanks for that!