Fork me on GitHub
#shadow-cljs
<
2017-10-15
>
thheller10:10:52

@mhuebert I decided against putting the externs into the config because it might make the config “big”. I can allow it there as well though.

thheller10:10:31

ideally there would be some sort of “library” where externs for packages are collected

thheller10:10:52

something like cljsjs has done

thheller10:10:05

I just don’t want to maintain that

thheller10:10:18

but something that maps npm packages names to their externs

thheller13:10:34

wrote that thing about externs

mhuebert19:10:23

Resending messages failed while hiking...

mhuebert19:10:41

for file format, what about sth like an .edn file of {:globals [...] :properties [...]}?

mhuebert19:10:48

that can be referenced by any # of builds

mhuebert19:10:43

Am wondering about reuse across builds, and inclusion in libraries

mhuebert19:10:53

Eg. I have a keyboard commands library that uses a JS lib, could I somehow include an externs file (txt or edn) that use picked up by downstream users?

thheller20:10:45

didn’t choose edn since that seems like too much to write

thheller20:10:14

just one identifier per line is enough, don’t need all the edn literals

thheller20:10:41

but yeah sharing across builds and libraries needs to happen somehow

thheller20:10:23

you can as always use the deps.cljs to ship :externs but that only works for the “real” externs. not the simplified version.

thheller20:10:53

can’t use the simplified version in libraries unless CLJS adopts it so it works for tools besides shadow-cljs

mhuebert21:10:37

Yeah, good point. Libraries can use the normal syntax