Fork me on GitHub

Hi , in clj or cljs extra data readers are loaded from a data-readers.clj file at the root. For example in How would I go about adding those same readers in self-hosted cljs? I have found register-tag-parser! in reader but that seems to only apply when (reader/read-string {:some-k "some val"}) My case is in a live editor sending render of components to different divs based on the reader tag.

#r1 [a-com opts-1]
#r2 [a-com opts-2]
thanks in advance


@fj.abanses pretty sure the self-hosted compiler uses this binding, so you can probably just bind that when you invoke the compiler? maybe the compile functions also take that as an arg?


thanks for the pointer @thheller , i am looking into it at the moment.


@thheller many thanks. A first quick test shows that the approach works. <using shadow-cljs here>

(defn eval-str [source cb]
  (binding [*cljs-data-readers* (merge *cljs-data-readers* {'r1 (fn [form] (str form))})]
    {:eval cljs/js-eval
     :load (partial boot/load c-state)
     :ns   (symbol project-ns)}


Does anyone here have experience publishing projects to the npm repository?


you mean like the shadow-cljs npm package? 😛


The reason I ask is because I’m trying to automate versioning, releasing, and publishing to npm via circleci. It looks like you’ve automated building and testing @thheller. Do you do these steps manually?


I do things manually. takes 5sec max. setting something up probably takes hours 😉

Asko Nōmm22:06:30

I think you can just connect a Github repository to NPM as well, and it would update the NPM as soon as a new tag is released on Github.

😮 3