From 072398a8f8080d9b1f8c6f34ef0a1c3f96e9c7d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Som=C4=93=20Cho?= Date: Sun, 2 Jul 2023 14:04:09 +0200 Subject: [PATCH] 0.0.15 - add conditional deps key selection --- build.clj | 2 +- src/depo/core.clj | 2 +- src/depo/readwrite.clj | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build.clj b/build.clj index 02fd778..2f8f830 100644 --- a/build.clj +++ b/build.clj @@ -4,7 +4,7 @@ [deps-deploy.deps-deploy :as dd])) (def lib 'org.clojars.some/depo) -(def version "0.0.14") +(def version "0.0.15") (def jar-file (format "target/%s-%s.jar" (name lib) version)) (def class-dir "target/classes") (def url "https://github.com/somecho/depo") diff --git a/src/depo/core.clj b/src/depo/core.clj index 9b98dfe..f959d72 100644 --- a/src/depo/core.clj +++ b/src/depo/core.clj @@ -33,7 +33,7 @@ (def CONFIGURATION {:command "depo" :description "Manage dependencies for Clojure projects easily" - :version "0.0.14" + :version "0.0.15" :opts [{:as "path to configuration file" :default nil :option "file" diff --git a/src/depo/readwrite.clj b/src/depo/readwrite.clj index 334eb70..66a555a 100644 --- a/src/depo/readwrite.clj +++ b/src/depo/readwrite.clj @@ -87,9 +87,10 @@ [config-path arg] (let [zloc (z/of-string (slurp config-path)) {:keys [groupID artifactID]} (dp/parse arg) + dep-key (if (= config-path "shadow-cljs.edn") :dependencies :deps) identifier (symbol (str groupID "/" artifactID))] (-> zloc - (z/get :deps) + (z/get dep-key) (z/string) (read-string) (as-> dep-map