Fork me on GitHub
#shadow-cljs
<
2018-05-23
>
thheller06:05:14

@grav my-package.namespace maps to my_package.namespace but must also be in a my_package/namespace.cljs. otherwise - is totally fine.

thheller06:05:06

@mhuebert yeah that should work. you might want to use (tap (:output-multi proc) c true) so the c closes when the worker stops

thheller06:05:21

ah nvm thats the default anyways

troglotit10:05:24

Hey! Is there anything like webpack-bundle-analyzer for shadow-cljs?

thheller10:05:48

still in pretty rough shape overall

troglotit12:05:55

I’m having issue when using default exports, they’re undefined I import them like this: [“moment” :default moment] [“react-datepicker” :default DatePicker]

thheller12:05:29

@troglotit default exports depend on how the package is packaged. if its commonjs it might just has a single export in which case it would be :as DatePicker or :as moment. you can try using :as x always and (js/console.log x) to see which properties it has. :default only works if there is a default property.

troglotit12:05:05

yeah, it was commonjs. It had "module": "es" - so I thought it should provide es modules 😅

thheller12:05:16

I still need to add support for those. unfortunately not all pacakges are available as ES and interop between some was weird

thheller12:05:48

current way seemed to be the best compatibility wise

mhuebert14:05:36

@thheller is push-state still the default for the shadow dev server? I seem to recall this was at one time, not sure if that has changed or if the docs should be updated

thheller16:05:27

@mhuebert yes its the default

4
lwhorton16:05:49

is there a built-in for running a particular namespace, but not all namespaces, through a test? or would that require creating a custom :runner-ns

lwhorton17:05:19

currently im using a custom runner-ns that is a clone of the provided https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/test/browser.cljs with a hard-coded regex 😛

thheller17:05:41

@U0W0JDY4C :ns-regexp "my.only.namespace-test"

thheller17:05:28

the runner should eventually get some kind of UI but thats not done yet

lwhorton17:05:33

would that require restarting the test process each time the config file changed?

thheller17:05:17

no, config changes automatically trigger a recompile

lwhorton18:05:47

ah that I did not know, :thumbsup:

lilactown16:05:50

is there any docs/explanation of what :dev {:compiler-options {:devcards true}} does?

mhuebert17:05:37

@lilactown that is a flag to enable https://github.com/bhauman/devcards (if you have included it)

mhuebert17:05:59

(it is not specifically related to shadow-cljs)

lilactown17:05:15

I know, I want to know what it actually does to the build 🙂

thheller17:05:20

which some of the macros use to decide if they should emit something or not