Fork me on GitHub
#scittle
<
2024-04-20
>
Miguel Cuervo Escribano19:04:14

Hi, I have a novice question about scittle (first time I tried to use it). I have a backend in Clojure and a frontend in JavaScript. I want to share some logic from the backend with the frontend. I want to load a scittle script with functions that I can invoke from the JavaScript frontend. However, since the same logic will be available for the Clojure backend, I would like to use cljc with conditional readers for ClojureScript and Clojure. Is this approach possible? Can I load a cljc file as a scittle script? The attempts I tried did not work, but I wonder if they are not working because they are not supported or because I am doing something wrong.

borkdude20:04:58

It could be that it currently doesn't work, but would be easy to fix. What is the error you're getting?

Miguel Cuervo Escribano11:04:04

It looks as if it is filtering out the conditional readers. In this modified example from the scittle repo, the alert is not invoked when clicking:

borkdude11:04:53

But you don’t see an error in the console?

borkdude11:04:12

GitHub issue for this is welcome btw

Miguel Cuervo Escribano11:04:44

Sure. I write it in few secs

borkdude12:04:08

New release is out now