Fork me on GitHub
#ldnclj
<
2015-07-16
>
pupeno07:07:08

Good morning.

thomas08:07:40

has anyone here tried cljc yet (reader conditionals)?

mccraigmccraig08:07:07

@thomas yes : i've just been working on a lib for message encoding/decoding/validation which is shared between the cljs ui and clj backend

mccraigmccraig09:07:54

the only difficulty i had was with expectations tests... the lein-expectations plugin didn't seem to recognise tests in .cljc files, so i had to separate out .cljs and .clj test files which were basically identical... this looks to be a problem with lein-expectations though

thomas09:07:10

so where should I put my cljc file? so that it will get picked up by both my clj and cljs code?

mccraigmccraig09:07:40

thomas: you can have a merged source-tree of clj, cljs and cljc files : have a look at : https://github.com/funcool/cats/

thomas09:07:23

thanks @mccraigmccraig I'll have a look at that

mccraigmccraig09:07:53

thomas: there are also examples in cats of how to do macros for cljs consumption in the same cljc file as the non-macro code : https://github.com/funcool/cats/blob/master/src/cats/core.cljc#L41

agile_geek09:07:42

I know it’s a long way off and not a Clojure specific conf, but is anyone planning to go to QCon 2016 in London in March? I’m thinking of booking before Sept.

malcolmsparks12:07:34

I've ported bidi to cljc (in a branch) but can't figure out how to get the cljs tests to pass - hoping someone will figure out cljc+ cljs testing so I can copy 😞

malcolmsparks12:07:52

but if anyone can point me to anything, i'd be really grateful

mccraigmccraig12:07:43

malcolmsparks: cats (url above) has tests working from cljs : "lein cljsbuild test" ... i copied their approach to my repo straightforwardly