Expose a netrepl when running bagatto in repl mode
This commit is contained in:
parent
1b776bd0f3
commit
05100ffe58
1 changed files with 16 additions and 1 deletions
17
index.janet
17
index.janet
|
|
@ -1,8 +1,23 @@
|
||||||
(import janet-html :as html)
|
(import janet-html :as html)
|
||||||
(import path)
|
(import spork/netrepl)
|
||||||
|
|
||||||
(import ./views)
|
(import ./views)
|
||||||
|
|
||||||
|
# ---
|
||||||
|
# expose the a netrepl for conjure to connect to when running in repl mode
|
||||||
|
# ---
|
||||||
|
|
||||||
|
(defn bag-repl? [cli-args]
|
||||||
|
(= ["bag" "--repl"] (slice cli-args 0 2)))
|
||||||
|
|
||||||
|
(def conjure-repl
|
||||||
|
(when (bag-repl? (dyn :args))
|
||||||
|
(thread/new (fn [_] (netrepl/server)))))
|
||||||
|
|
||||||
|
# ---
|
||||||
|
# site config
|
||||||
|
# ---
|
||||||
|
|
||||||
(bagatto/set-output-dir! "site")
|
(bagatto/set-output-dir! "site")
|
||||||
|
|
||||||
(def data {:config {:attrs {:title "arnes.space"}}
|
(def data {:config {:attrs {:title "arnes.space"}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue