-
Hi, I'm trying to understand the ojs runtime code with basic aim to redefine notebook values from Console and then do some simple or hacky hot module replacement implementation. The code that goes to browser in bundled and clearly joins a lot of Quarto and dependency code, so I want to find the source. I found the following repo: https://github.com/quarto-dev/quarto-ojs-runtime But I amn't confident that these contents match the runtime code in Does someone know if this is the case, if there is another source, or if I should follow from the bundle? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
(beware: these are deep waters. I wrote the code. Unfortunately, I won't really have the cycles to sit and walk you through it) With that said, what you're looking for lives in the quarto monorepo. You'll need to set that up, compile it, and then you'll have the build files |
Beta Was this translation helpful? Give feedback.
-
Thanks for the pointers @cscheid ! Thats exactly what I wanted to start to connect dots. I'm hacking to get at some hot replacement of local requires and file attachments (discussion #5411). I think the reactive OJS architecture is uniquely well placed to do this well, even giving notebooks control over how to handle updates (e.g. complete replacement versus maintain a history) +local tools i.e. Quarto preview is better placed than remote ones - clearly. A little starting progress here : https://github.com/declann/quarto-hmr-prototype Will share this more widely if/when I can get it to a coherent demo/application. |
Beta Was this translation helpful? Give feedback.
(beware: these are deep waters. I wrote the code. Unfortunately, I won't really have the cycles to sit and walk you through it)
With that said, what you're looking for lives in the quarto monorepo. You'll need to set that up, compile it, and then you'll have the build files
quarto-ojs-runtime.js
and its minified version. Copy those over to[src/resources/formats/html/ojs/quarto-ojs-runtime.js](https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/html/ojs/quarto-ojs-runtime.js)
in yourquarto-cli
source tree, and from therequarto render
should be using your fork.