This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # beginners (32)
- # boot (15)
- # cljs-dev (200)
- # cljsjs (1)
- # cljsrn (18)
- # clojure (4)
- # clojure-austin (2)
- # clojure-spec (6)
- # clojure-uk (8)
- # clojurescript (69)
- # cloverage (1)
- # cursive (12)
- # datomic (1)
- # dirac (37)
- # emacs (1)
- # hoplon (38)
- # off-topic (3)
- # om (19)
- # om-next (1)
- # onyx (4)
- # parinfer (2)
- # perun (27)
- # protorepl (4)
- # re-frame (5)
- # rum (9)
- # spacemacs (8)
- # untangled (2)
@bhagany: cool you're giving Perun a spin, it's definitely very rough around the edges but We're happy to help
@bhagany if you are going to have some CLJS anyways, just add a cljs build + reload. When HTML files change
boot-reload will initiate a hard reload.
@bhagany alternatively you may try
boot-livereload which @juhoteperi uses for his blog: https://github.com/Deraen/deraen.github.io/blob/blog/build.boot
@martinklepsch thanks! some judicious use of
(target) has helped me diagnose one of my issues - something is up with my output paths. Right now I think it’s that the default output dirs of
(cljs) are different, and as a result my
(serve) task can’t see the reload js. I’ll report back on how fixing that goes.
@bhagany yeah so the perun tasks mostly output to
public/ when using the
cljs task make sure you have a
.cljs.edn file somewhere in there so the compiled JS can be served
https://github.com/adzerk-oss/boot-cljs/wiki/Usage#multiple-builds — this has multiple builds in the heading but really it is recommended to just have a cljs.edn file
Boot-cljs will create one if there is none but you will want to understand why these files are there and how they can influence the build.
as an example these files are modified by the
reload task — extra code is injected into the build.
@bhagany I also started working on a better website for perun but it's still pretty much WIP besides one getting started guide
okay, I didn’t quite understand the
.cljs.edn on my first read-through, I’ll give it another go. My first impulse was to go the other way, and change perun’s output dir, rather than cljs’s. I’ll follow your recommendation instead.
@bhagany admittedly the documentation around .cljs.edn sucks and should be improved (for a long time) but so far we've spent time talking it through with people and explaining which is probably not the most sustainable approach 😄
hahaha, probably true, but I definitely understand. documentation is hard, and goes out of date easily.
one of the main pieces I was missing was where I should be putting the
.cljs.edn file. Once I got that, and also once I understood how boot-cljs sets
:output-to, it all came together.
the modern-cljs tutorials were very helpful as well. https://github.com/magomimmo/modern-cljs
oh, and also, understanding what you meant by “extra code is injected into the build” by boot-reload, and how that’s accomplished
in case any silent noobs are following along -
.cljs.edn files go in whatever you’ve defined as your
:output-to is set to the directory the
.cljs.edn file is in, relative to your resource path, with the extension replaced with
boot-reload modifies the
.cljs.edn file to include a
require that handles the websocket connection and reloading.
@bhagany: if you feel like writing this up in the boot-cljs wiki you'd be most welcome but I also took a note to do that earlier
Great to hear you've succeeded :)
I’m not sure I’m confident enough yet to write documentation, but I’ll be trying to get to that point. Thanks so much for your help
I figured, no pressure, just an invitation :) happy to review in any case