[skip ci] Update portal example
This commit is contained in:
parent
b95e826179
commit
06123c78a8
1 changed files with 8 additions and 9 deletions
|
|
@ -1,16 +1,20 @@
|
|||
#!/usr/bin/env bb
|
||||
|
||||
(ns portal
|
||||
(:require [babashka.classpath :as cp]
|
||||
(:require [babashka.deps :as deps]
|
||||
[cheshire.core :as json]
|
||||
[clj-yaml.core :as yaml]
|
||||
[clojure.data.xml :as xml]
|
||||
[clojure.edn :as edn]
|
||||
[clojure.java.shell :refer [sh]]
|
||||
[clojure.string :as str]))
|
||||
|
||||
(def cp (str/trim (:out (sh "clojure" "-Spath" "-Sdeps" "{:deps {djblue/portal {:mvn/version \"0.6.1\"}}}"))))
|
||||
(cp/add-classpath cp)
|
||||
(deps/add-deps '{:deps {djblue/portal {:mvn/version "0.9.0"}}})
|
||||
|
||||
(require '[portal.api :as p])
|
||||
|
||||
(.addShutdownHook (Runtime/getRuntime)
|
||||
(Thread. (fn [] (p/close))))
|
||||
|
||||
|
||||
(def file (first *command-line-args*))
|
||||
(when-not file
|
||||
|
|
@ -42,11 +46,6 @@
|
|||
:namespace-aware false)
|
||||
(xml->hiccup))))
|
||||
|
||||
(require '[portal.api :as p])
|
||||
|
||||
(.addShutdownHook (Runtime/getRuntime)
|
||||
(Thread. (fn [] (p/close))))
|
||||
|
||||
(p/open)
|
||||
(p/tap)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue