Fork me on GitHub
#shadow-cljs
<
2019-04-12
>
firstclassfunc15:04:34

Hey all, working on a node application that requires exporting methods from defrecord I am using the ^:export tag on the method, but I can’t seem to resolve it through :exports in shadow-cljs.edn any clues?

lilactown15:04:24

you can't export methods on a defrecord

lilactown15:04:32

you should create a wrapper function and export that

firstclassfunc15:04:05

@lilactown In advanced compilation you can

but I guess I am left to creating factory functions for now..

lilactown15:04:19

hm, I've never seen that tbh

firstclassfunc17:04:13

actually did get this to work. I was calling the method in the deftype definition when I needed to require it from the defprotocol definition

mauricio.szabo20:04:22

Just a feedback: yesterday I started a toy project in Clojure. I've missed multiple things that are shadow-specific, like the ability to control reloads of code, the hooks after compiling, the watch of files and auto-run tests. So thanks to change my perception of ClojureScript from a clumsy language to one that I really like to use 🙂

👍 4
coby20:04:38

Agreed, the hot-module reloading with the REPL integration is world-class. 🙂 Re: auto-run tests, you might be interested in lein-test-refresh https://github.com/jakemcc/lein-test-refresh