Fork me on GitHub
#sci
<
2021-08-22
>
viesti17:08:25

Humdum, got this idea that maybe I could use sci with a Cypress cljs preprocessor

viesti17:08:04

https://www.cypress.io/ has this concept of a "preprocessor", that takes a file and turns it into JS that can be run in the browser that Cypress runner is controlling. I've been hacking away with using shadow-cljs for that, but shadow feels a bit heavy-weight, something smaller could fit for a test script

viesti17:08:33

trying to now understand how sci could fit into the cljs -> js preprocessor flow

viesti17:08:11

inspiration for this thought was https://github.com/borkdude/scittle

viesti17:08:25

maybe there could be a "preprocessor", which would take the cljs file as input, then outputs a JS file, with the cljs source embedded, which when run by cypress in the browser that it controls, would evaluate the cljs source via sci

viesti17:08:41

would have to take into account how to a test script could load libraries though

viesti17:08:30

I think in the JS land, this happens now via browserify/webpack, so libs get "embedded" into the test script

viesti17:08:52

so hmm, handling require might be interesting, might not be as dynamic at least