v0.0.19
npm packages
You can use packages from npm in your Joyride scripts. There's an example of this, using posthtml-parser in
html_to_hiccup.cljs
To use a package from npm, Joyride needs to find it somewhere in the path from the using script and up to the system root. Some directories to consider for your Joyride node_modules are ~/.config/joyride and <workspace-root>/.joyride. Sometimes the workspace root makes sense. To try this particular example you can:
- Have the Joyride repo check out, say in a folder named
joyride $ cd joyride/examples$ npm init -y$ npm icode exmaples- Issue the command: Calva: Start a Joyride REPL and Connect
- Open
examples/.joyride/scripts/html_to_hiccup.cljsand Calva: Load/Evaluate Current File - Place the cursor somewhere in the
(-> ...)form and Calva: Evaluate Top Level Form
This example also uses clojure.walk. (Somewhat unecessary according to some, but there certainly are occations when it can be put to great use.)
clojure.zip
clojure.walk is wonderful, and so is [clojure.zip](https://clojuredocs.org/clojure.zip! See zippers.cljs
Hickory
Hickory is not included with Joyride, but that doesn't mean you can't use it! In there is the slighly (very slightly) modified source of hickory.select as well as the unmodified source of hickory.zip. This makes the find-in-html possible. (See npm packages about the npm dependency.)


