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!