Fix classpath in README
This commit is contained in:
parent
3dedbb3b2d
commit
2f04a63c8c
1 changed files with 4 additions and 2 deletions
|
|
@ -361,10 +361,12 @@ dynamically:
|
|||
|
||||
``` clojure
|
||||
(require '[babashka.classpath :refer [add-classpath]]
|
||||
'[clojure.java.shell :refer [sh]])
|
||||
'[clojure.java.shell :refer [sh]]
|
||||
'[clojure.string :as str])
|
||||
|
||||
(def medley-dep '{:deps {medley {:git/url "https://github.com/borkdude/medley"
|
||||
:sha "91adfb5da33f8d23f75f0894da1defe567a625c0"}}})
|
||||
(def cp (:out (sh "clojure" "-Spath" "-Sdeps" (str medley-dep))))
|
||||
(def cp (-> (sh "clojure" "-Spath" "-Sdeps" (str medley-dep)) :out str/trim))
|
||||
(add-classpath cp)
|
||||
(require '[medley.core :as m])
|
||||
(m/index-by :id [{:id 1} {:id 2}]) ;;=> {1 {:id 1}, 2 {:id 2}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue