Fork me on GitHub
#boot
<
2018-03-16
>
vaz06:03:45

Is there anything like boot for Node.js-CLJS dev that can launch off Lumo? I mean workflow-wise (not a big fan of lein's config philosophy), since e.g. Pods (which I realize is kind of a huge selling point for boot so maybe I've got some wrong ideas here) probably doesn't make sense outside of JVM. Or let me pre-empt the "the answer is you're asking the wrong question" and try and phrase something simpler. Can I get a boot-like procedural config style and task running that cold-starts fast on V8 like Lumo? Or should I just script Lumo's build API... or rethink my assumptions and just go back to learn what I'm talking about better.

vaz06:03:25

I've seen some packages but many are very out-of-date. I'm not unwilling to hack on something myself but some quick opinions could help focus me or save me the work. I don't need anything from the JVM ecosystem at all, and I realize instant-feedback REPL driven development is essential to the clojure experience and I want that, but I do end up relaunching boot often enough that is actually really puts me off of it sometimes.

vaz06:03:41

Sorry for the long question but I'd be grateful for even the briefest of pointers in some direction. Thanks 🙂

seancorfield06:03:38

Are you looking for something task-like?

seancorfield06:03:45

I think it would be interesting to have a Boot-like system built on top of Lumo. The main things Boot brings to the table are: the idea of a task pipeline; tasks as middleware; built-in CLI argument processing. I doubt anything exists right now, but building that sort of thing shouldn't be too hard...

seancorfield06:03:45

...as you say, pods etc don't make sense on Node.js. What about loading dependencies dynamically? I don't know enough about Lumo to know if that is supported.

vaz06:03:45

Within the same session you mean? I'm not sure about that - I don't think so currently but I could be wrong - but I can't think of a reason why it's not possible off the top of my head. But OTOH with fast startup 90% of the pain is gone anyway, at least in early development. I'm also not so sure what the story looks like for browser hot reloading, can you just run a figwheel server anyway with boot (or a theoretical boot-like tool on Lumo)? It seems like most of the meat of figwheel lives in its server and not tied to a lein task, but you never see it mentioned without lein. Yeah, I guess what I'm looking for is for something like boot's task pipeline and approach to "middleware" (just more pipeline) / easy task authoring, and the dep management (which is not too hard to find/do on its own, but nice when the task pipeline's there to let you modify your environment in a consistent way).

vaz06:03:54

Or maybe some of the other browser loading options for CLJS are mature and just fine, I've got about 50 tabs yet to go through...

vaz06:03:29

Or webpack could just do it if you build purely for Node and hook that and babel in the build process, which to take advantage of all of NPM in the browser maybe is a good idea anyway. No wait I'm being silly. Closure lib deals with the browser stuff of course.

vaz07:03:51

I think I am going to just play more with a template like https://github.com/Deraen/saapas or tenzing (they use Boot, but JVM of course) until I can ask better questions, or understand what I think a pure Node-based boot-inspired tool should look like and just get hacking. Hah. Thanks for your reply. 🙂

vaz10:03:02

Just to follow up in case anyone's reading: shadow-cljs seems promising, it's not based on or dependent on lein/boot or JVM and emphasizes interop both ways with Node. Have yet to try. - https://github.com/thheller/shadow-cljs - https://code.thheller.com/blog/shadow-cljs/2017/09/15/shadow-cljs-introduction.html Still do really like boot though, obvious choice I think for clj/hybrid projects.

dave13:03:30

@U3HMZGQ3S: you may find https://github.com/juxt/mach interesting, if you're looking for a cljs-on-node way to get a task-based workflow

vaz01:03:31

Thanks @U0AHJUHJN I'll check it out!

borkdude19:03:08

does someone has a boot-cljs config example with https://github.com/Day8/re-frame-10x enabled?

borkdude19:03:13

can’t get it to work

borkdude20:03:26

I got the previous version working before it was renamed to 10x, but now it requires a :main in your compiler config

danielcompton21:03:23

@borkdude it’s always needed it I think, we just didn’t realise

danielcompton21:03:37

Cause we only tested it on projects that had a main

danielcompton21:03:55

You can set it up manually if you inject the preloads yourself

danielcompton21:03:15

Shouldn’t be much changing with the name change

borkdude22:03:52

hmm, if so, then I don’t know why ctrl-h didn’t do anything

borkdude22:03:43

I could probably call the function behind that keybinding from the repl