This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-04
Channels
- # beginners (46)
- # boot (65)
- # cider (8)
- # cljs-dev (5)
- # cljsrn (4)
- # clojure (50)
- # clojure-conj (2)
- # clojure-france (1)
- # clojure-greece (18)
- # clojure-russia (8)
- # clojure-spec (39)
- # clojure-uk (36)
- # clojurescript (36)
- # clr (16)
- # component (2)
- # cursive (6)
- # datascript (3)
- # datomic (31)
- # devcards (2)
- # editors-rus (1)
- # emacs (15)
- # events (2)
- # figwheel (1)
- # funcool (24)
- # garden (3)
- # hoplon (22)
- # instaparse (15)
- # leiningen (3)
- # luminus (4)
- # om (59)
- # onyx (24)
- # overtone (1)
- # pedestal (3)
- # planck (18)
- # prelude (1)
- # protorepl (2)
- # re-frame (5)
- # rum (1)
- # sql (1)
- # uncomplicate (1)
- # untangled (66)
- # vim (18)
- # yada (4)
but if I really miss figwheel should’t I be able to make it work? Or it’s still would be a bit “clunky”?
I'm very new to boot
. I just began modern-cljs tuto to get started and there is a live reload solution within
@romain oh yes, there’s boot-reload
but I still was hoping to use figwheel - Bruce Hauman seems to be doing some cools stuff with it.
@ag it's really not much different with the boot tools. Nobody has taken the time to show the source code where the error is yet, but I don't think it would be complicated to add that to boot reload / boot cljs
I totally mixup on filesets. I want to know that how is the workflow of compiling cljs files and serving them via my own ring app, would be ?
@lxsameer you want to serve resources. An example can be found at https://github.com/hoplon/demos/blob/master/castra-simple/src/app/handler.clj#L10
@ag I know that @richiardiandrea was looking into fixing something on boot-figwheel, I never used it myself.
@lxsameer that is using a compojure route to serve your resources on the "/"
path. It will make everything on your resources available on the server and should only be used for dev.
So if you have "assets/images/pic.jpg" on your output fileset it will be served if you do a request to localhost:8000/assets/images/pic.jpg
if you are running a server in the boot context.
The handler is passed to the server task here: https://github.com/hoplon/demos/blob/master/castra-simple/build.boot#L33
I am actually now reconsidering fixing boot-figwheel
, @juhoteperi actually already went through that path and suggested augmenting boot-cljs
instead
@lxsameer https://github.com/adzerk-oss/boot-cljs/wiki/Serving-files this might also be helpful
@richiardiandrea what is your approach? i kinda got figwheel working in a task using figwheel-sidecar.repl-api
I’m dumping the figwheel stuff into a resource which is being served via boot serve… my issue is that sometimes it does not reload the changes on save, i’m assuming cause the file sync takes place onto the temp fileset and figwheel notifies the browser too soon
@naomarik yes the problem with the sync is exactly that, figwheel writes on dirs that are not managed by boot and given that boot-http
serves from the classpath you won't see the new file sometimes
no no I have already been there
that path won't work unfortunately
yes a hook after figwheel completes would be a patch to that...you can manually call boot functions that sync the mutable figwheel files with the immutable boot fileset
but it is a super hack
figwheel should only be used probably to compile on the fileset, disable all the watchers
and this is basically what boot-cljs
does
so @juhoteperi is right when he says that it is probably better to add the figwheel client to boot-reload
@micha or @martinklepsch , I'm looking at implementing issue #450 (making 'task-options!` able to use delays). It seems like the most straightforward way to make it work would be to write essentially an apply wrapper that walks through all of the arguments to a task and forces it if it's a delay. Any thoughts on that approach?
the issue with delays is that the user should be able to assume that task-options! merges options synchronously
okay, interesting point. That's what would happen currently with a non-delay value right?
yeah. okay, i see what you're getting at. that's the case where if we wanted to handle it "transparently" to the user, we'd wrap it in another delay and keep doing that...
but it's potentially surprising because that means the update to the task options will happen later than expected because of the delay.
cool. good food for thought. I'll probably take a stab at just getting it working without considering that angle to get a better handle on what the solution will look like
hey guys… is there a way to “check” is serve
is already running and "wrap" a task around it. So let's say I have two separate cljs profiles: dev and devcards - they both require pandeiro.boot-http/serve
. I can't truly restart serve
task. because of this: https://github.com/pandeiro/boot-http/issues/25. So what if in my task I check if ring-handler is running and if not then (serve)
❓