Fork me on GitHub
#boot
<
2015-09-28
>
jgdavey15:09:08

Has anyone been able to use boot-cljs with a deps.cljs that points at foreign-deps with :module-type?

jgdavey15:09:49

It seems to work fine without the module-type option on a plain JS file, but doesn’t pick up a commonjs file.

micha17:09:25

@jgdavey: you're using the correct version of org.clojure/clojurescript right?

micha17:09:36

like a version that supports this

jgdavey17:09:18

Yes. I’ve tried 1.7.48 and 1.7.122

micha17:09:40

are you sure those versions work with the :module-type option?

micha17:09:56

i feel like those were before that option existed

jgdavey17:09:59

[adzerk/boot-cljs “1.7.48-4”]

jgdavey17:09:34

Well, 1.7.122 is the latest release (August)

juhoteperi17:09:57

122 is latest non-stable release, but yeah

juhoteperi17:09:01

it should work with current boot-cljs

micha17:09:11

maybe :module-type hasn't made it into a relaase yet

juhoteperi17:09:25

Do you have example of package using :module-type?

jgdavey17:09:41

I was looking at https://github.com/mneise/circle-color. She uses cljs 1.7.48

juhoteperi17:09:18

Did you install clojurescript using the instructions there?

jgdavey17:09:47

Ooops. I did not

juhoteperi17:09:05

Looks like it needs custom closure-compiler and Clojurescript needs to be updated to depend on custom closure-compiler

jgdavey17:09:25

Seems true, now that I read it

jgdavey17:09:56

thanks for the sanity check!

jaen18:09:49

@jgdavey: how badly do you need that option and what libraries would you use?

jgdavey18:09:08

@jaen I have a work-around for the current React component I’m integrating (wrap in self-executing closure and require like a normal js dependency)

jgdavey18:09:52

But, according to dnolen, the :module-type option is still a WIP anyway

jaen18:09:47

@jgdavey: ha, it is, but you might have some luck using this - https://github.com/jaen/react-with-modular-cljs - or this - https://github.com/jaen/custom-module-loaders - depending on the library you want to use (the former is less of a hack but doesn't support everything, the latter is more hacky, but so far handled everything I threw at it

jaen18:09:15

But if you have a workaround it might be worth waiting until that shows up in the compiler

jaen18:09:23

Though it'll probably be a while still

jgdavey18:09:34

@jaen very cool. Thanks for working through this. I’m sure I’ll learn a bunch from reading through it.

jaen18:09:02

It might be best if you try not to, the custom-module-loaders is Cthulhu levels of insanity, but if you're interested in how the former repo works then try this - https://github.com/jaen/clojurescript/tree/feature/add-modular-lib-support

jaen18:09:06

It is quite sane in comparision

jaen18:09:20

Though it will probably have to be redone for inclusion into Clojurescript