Fork me on GitHub
#shadow-cljs
<
2018-07-09
>
jmckitrick14:07:52

Is the shadow-re-frame repo the current recommended starting point for a project of that type?

kasuko15:07:26

I took a look at shadow-cljs and like what I saw. I was wondering is there any advice for packaging and consuming a shadow-cljs project as a library in another Clojurescript project that may be a leinigen project?

thheller16:07:10

@kasuko shadow-cljs currently has no built-in support for packaging/publishing libraries. you can use lein for that though. as far as comsuming that goes there is nothing special regarding shadow-cljs and it works just like any other cljs lib.

thheller16:07:02

@jmckitrick I don't use re-frame myself but I tested this most recently and it worked well https://github.com/jacekschae/shadow-re-frame

jmckitrick16:07:49

Perfect, thanks!

kasuko17:07:25

@thheller I need to use shadow-cljs to handle NPM dependencies that the current core-cljs library can not. So I need shadow-cljs to compile and output those dependencies in JS that could be properly imported by core-cljs ... should I be using the :browser target?

kasuko17:07:01

Specifically I am trying to make a reagent based ApolloClient wrapper

thheller17:07:14

thats not possible. CLJS libraries only contain the source code, no compiled code.

kasuko17:07:19

Ah damn, I really hoped that'd be possible.

thheller18:07:34

unfortunately not. I guess you could try the cljsjs route if there isn't a package for apollo-client already?

lilactown21:07:18

is there a way to tell the closure compiler not to eliminate a namespace?

lilactown21:07:11

I'm trying to do a release version of a bunch of devcards (weird I know), which get included in a top-level ns that just calls devcards.core/start-devcard-ui!

lilactown21:07:37

the namespaces that don't have explicit side effects (e.g. a println) get removed tho 😞

wilkerlucio22:07:23

@lilactown mark the function as export, eg: (defn ^:export dont-kill-me [])

lilactown22:07:02

aweomse thanks!

oscar23:07:01

I want to use the built-in http server to develop my API, but I can't seem to get it to reload namespaces. I've tried wrap-reload and (clojure.tools.namespace.repl/refresh) but I can't seem to get anything to work.