From 802588504066836dedebf54d0006a2908fe95d6d Mon Sep 17 00:00:00 2001 From: eltrac Date: Thu, 15 Oct 2026 18:11:48 +0800 Subject: project: replace just command runner with Babashka tasks --- .gitignore | 1 + README.md | 17 ++++------------- bb.edn | 10 ++++++++++ justfile | 7 ------- 4 files changed, 15 insertions(+), 20 deletions(-) create mode 100644 bb.edn delete mode 100644 justfile diff --git a/.gitignore b/.gitignore index d3be789..1c265f0 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /.nrepl-port /target /native/ +/.clj-kondo diff --git a/README.md b/README.md index 70c4f9f..2eaadff 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,6 @@ A Clojure library that parses [microformats](http://microformats.org/). Under th ## Usage -``` -[ac.eltr/mf2clj "0.0.3"] -``` - ```clojure (require '[mf2clj.core :as mf2clj]) (mf2clj/parse html-string) @@ -17,17 +13,12 @@ A Clojure library that parses [microformats](http://microformats.org/). Under th ## Development -Make sure you have [tinygo](https://tinygo.org/) compiler, [Leiningen](https://leiningen.org/) and [just](https://github.com/casey/just) installed. *Why not `make`, you say? Because, my friend, [make is crap](https://invidio.us/watch?v=YjXfjdCmfD4).* +Make sure you have [tinygo](https://tinygo.org/) compiler, [Leiningen](https://leiningen.org/) and [Babashka](http://babashka.org/) installed. -```sh -# compile Go to WebAssembly (WASIP1) -just build-wasm - -# compile Clojure wrapper to .jar -just build-jar # or lein uberjar +Run the following command to build WebAseembly and `.jar`. -# compile both -just build +```sh +bb build ``` --- diff --git a/bb.edn b/bb.edn new file mode 100644 index 0000000..72f9fa4 --- /dev/null +++ b/bb.edn @@ -0,0 +1,10 @@ +{:tasks + {build-wasm (do (println "building wasm...") + (shell {:dir "go"} "tinygo" "build" + "-o" "../resources/mf2go.wasm" + "-target" "wasip1" + "-buildmode=c-shared" + "main.go")) + build {:depends [build-wasm] + :task (do (println "building jar...") + (shell "lein" "uberjar"))}}} diff --git a/justfile b/justfile deleted file mode 100644 index c82eac1..0000000 --- a/justfile +++ /dev/null @@ -1,7 +0,0 @@ -build-wasm: - cd go && tinygo build -o ../resources/mf2go.wasm -target wasip1 -buildmode=c-shared main.go - -build-jar: - lein uberjar - -build: build-wasm build-jar -- cgit v1.2.3