Fork me on GitHub
#fulcro
<
2019-09-27
>
tony.kay00:09:24

great, thanks!

tony.kay00:09:14

websockets 3.0.4 released to clojars

đź‘Ť 4
ssdev20:09:02

Hi folks, anyone have any experience adding a sass build process into the fulcro build pipeline?

currentoor20:09:37

@ssanders yes, don’t do it lol

currentoor20:09:26

unless the person writing the styles isn’t CLJS savvy

currentoor20:09:32

but if you have to use sass (or less or whatever else) it doesn’t have much to do with fulcro, because fulcro is not a build tool

currentoor20:09:01

if you’re using shadow-cljs, it’s docs show how to integrate sass

ssdev20:09:15

Yeah, I get that. That's why I was asking about the actual build pipeline

ssdev20:09:41

Was more looking for an example of it being done somewhere as a reference

currentoor20:09:45

i just use the sass ruby gem to build CSS files into the same public directory where shadow-cljs outputs

ssdev20:09:51

I must be missing the sass section of the cljs docs. Will do a search

currentoor20:09:08

no what i’m saying is don’t use cljs for sass

currentoor20:09:16

it’s not the right tool

ssdev20:09:18

I do see a css section in the shadow cljs docs though

currentoor20:09:13

i use this command sass --watch scss:resources/public/css to build my sass into the public directory

currentoor20:09:24

shadow-cljs takes care of the dev reloading from there

currentoor20:09:39

using the ruby gem

currentoor20:09:09

and for production deploys you can do something similar with minification

mss20:09:58

hey all, let’s say you have a series of query components that exist to build up your initial root query. some of those query components contain dependency refs that end up being circular. how can you specify a query along the lines of “expect this ident” in a way that avoids requiring the file and creating a circular dependency ref?

mss20:09:54

I see in the book a way to avoid circular refs for recursive components, but these aren’t recursive. just circular in terms of file depencies

currentoor20:09:07

well ideally you create extra namespaces to avoid circular namespaces

currentoor20:09:09

@mss you can try using comp/registry-key->class to get a component class without it’s symbol

currentoor20:09:06

but that’ll only work if fulcro builds it’s component registry before gets any queries

mss20:09:59

seems like creating extra namespaces is the easier, if slightly duplicative, way to go. totally fine by me

currentoor20:09:40

yeah it’s something you often end up having to do in clj/cljs

currentoor20:09:54

just because the language doesn’t support circular requires

currentoor20:09:17

i wouldn’t fight it, will probably cause problems later if you do

currentoor20:09:01

that said, comp/registry-key->class is a totally viable way to reference component classes without requiring their namespaces, i use that all the time

currentoor20:09:18

especially when issuing loads/mutations

currentoor20:09:59

since fulcro has built it’s component registry by then

mss21:09:19

that all makes sense and ended up working. thanks for the help!

currentoor21:09:34

happy to help

tony.kay22:09:26

NOTE: Fulcro Inspect update on chrome may break. If it does, just uninstall/reinstall the extension.