Skip to content

Releases: BetterThanTomorrow/joyride

v0.0.24

28 Nov 14:54
@PEZ PEZ
Compare
Choose a tag to compare

v0.0.23

22 Nov 10:41
@PEZ PEZ
Compare
Choose a tag to compare

v0.0.22

18 Nov 20:22
@PEZ PEZ
Compare
Choose a tag to compare

v0.0.21

22 Oct 21:17
@PEZ PEZ
Compare
Choose a tag to compare

v0.0.20

18 Oct 16:22
@PEZ PEZ
Compare
Choose a tag to compare

v0.0.19

15 Oct 15:50
@PEZ PEZ
Compare
Choose a tag to compare

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

assets/joyride-html2hiccup.png

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:

  1. Have the Joyride repo check out, say in a folder named joyride
  2. $ cd joyride/examples
  3. $ npm init -y
  4. $ npm i
  5. code exmaples
  6. Issue the command: Calva: Start a Joyride REPL and Connect
  7. Open examples/.joyride/scripts/html_to_hiccup.cljs and Calva: Load/Evaluate Current File
  8. 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.)

v0.0.18

11 Oct 15:52
@PEZ PEZ
Compare
Choose a tag to compare

v0.0.17

17 Aug 08:49
@PEZ PEZ
Compare
Choose a tag to compare

v0.0.16

16 Aug 15:15
@PEZ PEZ
Compare
Choose a tag to compare

v0.0.15

01 Jun 15:49
@PEZ PEZ
Compare
Choose a tag to compare