Creates or updates your deps.edn file, based on your project’s project.clj.
You can invoke it “over the air” as follows:
curl -sq https://raw.githubusercontent.com/hagmonk/depify/master/src/depify/project.clj | clj -Or, create an alias in your ~/.clojure/deps.edn map:
:depify {:extra-deps {org.clojure/clojure {:mvn/version "1.9.0"}
depify {:git/url "https://github.com/hagmonk/depify"
:sha "5bd166f0191cc8d57eecb36e50a6196de3991dea"}}
:main-opts ["-m" "depify.project"]}
:zprint {:extra-deps {org.clojure/clojure {:mvn/version "1.9.0"}
zprint {:mvn/version "0.4.9"}}
:main-opts ["-m" "zprint.main"]}Notice here I also have zprint as an alias, enabling this from your project folder:
clj -A:depify | clj -A:zprint > deps.edn.tmp ; mv deps.edn.tmp deps.ednNote: depify will merge its results into any pre-existing deps.edn file in your project folder, but also print the result to stdout. Also, the “Stream closed” exception emitted by zprint can be safely ignored.
Running arbitrary Clojure code from an arbitrary URL on the internet is known to cause cancer. But hey, if it feels good, go ahead and do it.
Based on the initial concept in this gist by Sean Walker. Depify improves on it slightly:
project.clj
(def something "0.1.2")
(defproject foobar
:dependencies [[something/gizmo ~something]])deps.edn
{:deps #:something{gizmo #:mvn{:version "0.1.2"}}}project.clj
(defproject foobar
:respositories [["dracular" "https//transy.edu"]]
:dependencies [[something/gizmo "9.9.9"]
[org.apache/another-database "1.2.3" :exclusions [logging-nightmare]]]
:jvm-opts ["-XX:+EnormousBiceps"])
deps.edn
{:deps
{something/gizmo #:mvn{:version "9.9.9"},
org.apache/another-database
{:mvn/version "1.2.3", :exclusions [logging-nightmare]}},
:jvm-opts ["-XX:+EnormousBiceps"]}