Hello everyone. I’m new to PureScript, savoring it as a switch from Elm because many things look more convenient (infixes, type classes, flexibility, FFI, etc…).
But there’s something cheesy in FFI. It seems handier to bundle external libraries with our project (not a library to be published, yet), so we wouldn’t need to worry about embedding it separately. But how?
The point is: we take the recent state of the ecosystem, and psc-package is more and more preferred. We see that it works in the
purescript- namespace. How can we bundle our FFI dependencies (like CodeMirror or highlight.js) in a psc-package based project (and build it together with PS code) ?
As far as I know, there are existing ways to do it outside of psc-package (let this thread be even more useful):
- HTML embedding (purescript-jquery), which is OK for non-NPM libraries, yet some of them exist in npm repositories (same for CodeMirror), but Node-based ones are in possible scope.
- Bower installation (purescript-sammy), which is OK too, but we recall to the point here?
- npm chaining (purescript-react, example at the link), which looks difficult (no guides found yet) and scary (building without pulp? oka~y).
nothing clear about psc-package (EDIT: look below) . Would be glad for some existing examples or even guides. Nix compatibility notes are optional but useful.