Fork me on GitHub
#scittle
<
2024-06-07
>
Daniel Slutsky11:06:52

Hello @borkdude &@sritchie09. @nek and I are finally coming back to the hope of embedding https://github.com/mentat-collective/emmy-viewers in plain HTML. The goal is to make it easy to include them in blog posts, books, Reveal.js slideshows, etc., alongside https://scicloj.github.io/kindly-noted/kinds that we typically use. Ideally, the user should just add a JS dependency to their HTML page, and be able to include viewers as script tags to create the Reagent components. One way to do it is creating a fork of Scittle with the relevant dependencies, https://github.com/scicloj/scittle/commit/eb01deb3c31fe87b729ceee4eef123d17d52491e. (I remember there are other ways to extend Scittle, but afaik they will complicate things on the user side.) Would you still consider this a decent solution? Or would you recommend looking elsewhere for alternatives?

borkdude11:06:53

> One way to do it is creating a fork of Scittle There is a better option, create a scittle plugin and then re-compile scittle with that plugin enabled: https://github.com/babashka/scittle/tree/main/plugins/demo

borkdude11:06:28

@U05094X3J has created the scittle hoplon project, and is using this setup

borkdude11:06:37

let me look if I can find the source

borkdude11:06:14

maybe it's not public. but at least this is how you can do it too.

borkdude11:06:58

oh yes, of course :)

borkdude11:06:56

do you have the code where you build it?

borkdude11:06:03

in CI or so

mynomoto11:06:56

I only build it once so it was on my machine. I think I changed the scittle build itself to add the hoplon plugin. One thing to notice is that you cannot combine js generated from different builds, you need to use all the outputs from the same build.

👍 1
borkdude11:06:13

Maybe we can change the scripts a bit to include plugins via an env var or so

borkdude11:06:56

anyway, let me know if you have any questions about this @U066L8B18

Daniel Slutsky14:06:19

That is very helpful, many thanks @borkdude & @U05094X3J.

Sam Ritchie14:06:43

this is fantastic!!!

🙏 1
Sam Ritchie14:06:49

@U066L8B18 I’ve been making lots of maria sketches to help folks with emmy-viewers, it’s been great: https://2.maria.cloud/gist/9376a3d9e0408de7d5cdb8d5dddbd37b

Daniel Slutsky14:06:22

Yes, I saw! Fantastic