Fork me on GitHub
#babashka
<
2024-01-31
>
Omer ZAK01:01:07

Another approach for ensuring that a Babashka script has all dependencies it needs (I am using the clansi library as an example): Add the following at script's beginning after the shbang and the ns declaration:

;; Resources:
;;     for add-deps: 
;;     for clansi/clansi: 
(deps/add-deps '{:deps {clansi/clansi {:mvn/version "1.0.0"}}})
(require '[clansi :as clansi])
Given this, is there any reason to prefer using bb.edn to declare dependencies?

🤯 2
borkdude07:01:51

Yes, for Clojure-LSP if you’re using it and bb tasks

👍 1
1