Fork me on GitHub
#shadow-cljs
<
2019-01-16
>
hueyp00:01:31

does anyone know how to kinda tell shadow-cljs of a dependency that doesn’t exist in package.json? in my example, jquery w/ bootstrap ;/

hueyp00:01:31

I don’t think I get it … are you saying move jquery to a CDN? or we can actually configure npm bootstrap to have a direct dependency on our npm jquery?

thheller00:01:00

I was assuming you already loaded jquery by other means?

thheller00:01:12

why else would it not exist in package.json?

hueyp00:01:32

bootstrap’s package.json doesn’t actually list jquery as a dependency … but it really is … its a bad package tbqh

hueyp00:01:39

our current answer is — shove the dependency in ourselves 😜

hueyp00:01:44

seeing if this works …

thheller00:01:55

then add jquery to your deps?

thheller00:01:07

peerdependencies are pretty common in npm world

thheller00:01:15

perfectly normal for you to add it

hueyp00:01:38

oh … we can actually define bootstrap’s peer dependencies?

thheller00:01:05

no you add bootstrap and jquery to your deps

thheller00:01:10

thats how it works in node land

hueyp00:01:41

we have both, and both get loaded, but the order they get loaded is not guaranteed to be correct* as bootstrap doesn’t list a dependency on jquery, but it really has one

hueyp00:01:00

like — its a bad package.json

thheller00:01:17

wasn't that fixed ages ago? I submitted a patch ages ago which was merged

thheller00:01:30

but you can control the load order by just requiring jquery before bootstrap

hueyp00:01:39

:thumbsup:

metacritical10:01:11

@thheller I am writing this bootstrapped electron app, when i pass the option {:verbose true} to eval-str it dumps build messages as console.error messages to the devtools area, i presume that it is because *out* is mapped to console ? I am right in thinking that? And if so can i map it to something else ? I want to map out such that these debug messages are visible in a text area in the app instead of devtools console. Would it be possible to do that?

metacritical10:01:55

Thanks is advance.

lsnape11:01:09

Hi, is there a way to suppress compiler warnings that are caused by 3rd-party code?

thheller11:01:10

@metacritical since bindings don't work well in async environments (ie. CLJS) you kinda have to pick one logger. so either everything goes to console or everything goes to wherever you set *out* to. you can call (set-print-fn! (fn [foo] ....)) to control where prints goes.

metacritical11:01:26

@thheller Aha, i actually want to get all console messages in one place, this is helpful. Thanks.