~subsetpark/bagatto

9bc1d2ab37939d81280b10355cae9b78532ff3f1 — Zach Smith 3 months ago a283104 14/native-import
Import natives
4 files changed, 10 insertions(+), 4 deletions(-)

M demo/vendoring/templates/page.temple
M project.janet
M src/core.janet
M src/env.janet
M demo/vendoring/templates/page.temple => demo/vendoring/templates/page.temple +2 -1
@@ 1,1 1,2 @@
{- (bagatto/markdown->html (get-in args [:_item :body])) -}
{$ (import moondown) $}
{- (moondown/render (get-in args [:_item :body])) -}

M project.janet => project.janet +2 -1
@@ 13,7 13,8 @@
(declare-executable
  :name "bag"
  :entry "main.janet"
  :install true)
  :lflags ["-rdynamic"]
   :install true)

(declare-source
  :source ["bagatto.janet"])

M src/core.janet => src/core.janet +1 -0
@@ 22,6 22,7 @@
                (temple/add-loader)
                (merge-into root-env bagatto)
                (setdyn :executable-blacklist env/exec-blacklist)
                (env/prepare-syspath!)
                (f parent))
              1 :hc))


M src/env.janet => src/env.janet +5 -2
@@ 1,3 1,4 @@
(import path)
(import temple)
(import sh)



@@ 25,10 26,12 @@
      0 true
      false)))

(defn- prepare-syspath! []
(defn prepare-syspath! []
  (match (os/getenv "JANET_PATH")
    nil :ok
    janet-path (put root-env :syspath janet-path)))
     janet-path (do
                  (array/push module/paths [(path/join janet-path ":all::native:") :native])
                  (put root-env :syspath janet-path))))

(defn- populate-exec-blacklist!
  ```