1
0
mirror of https://github.com/janet-lang/janet synced 2025-06-12 11:34:13 +00:00

Install to bundle/ instead of _bundles/

This commit is contained in:
Calvin Rose 2024-05-14 20:51:29 -05:00
parent 42bd27c24b
commit 3c8346f24e

View File

@ -3969,11 +3969,11 @@
(defn- bundle-dir (defn- bundle-dir
[&opt bundle-name] [&opt bundle-name]
(string (os/realpath (dyn *syspath*)) "/_bundles/" bundle-name)) (string (os/realpath (dyn *syspath*)) "/bundle/" bundle-name))
(defn- bundle-file (defn- bundle-file
[bundle-name filename] [bundle-name filename]
(string (os/realpath (dyn *syspath*)) "/_bundles/" bundle-name "/" filename)) (string (os/realpath (dyn *syspath*)) "/bundle/" bundle-name "/" filename))
(defn- get-manifest-filename (defn- get-manifest-filename
[bundle-name] [bundle-name]
@ -4041,7 +4041,7 @@
# like :fresh true, but recursive # like :fresh true, but recursive
(with-dyns [*module/cache* @{} (with-dyns [*module/cache* @{}
*module/loading* @{}] *module/loading* @{}]
(require (string "_bundles/" bundle-name))))) (require (string "bundle/" bundle-name)))))
(defn- do-hook (defn- do-hook
[module bundle-name hook & args] [module bundle-name hook & args]
@ -4089,6 +4089,7 @@
(def module (get-bundle-module bundle-name)) (def module (get-bundle-module bundle-name))
(do-hook module bundle-name :build man) (do-hook module bundle-name :build man)
(do-hook module bundle-name :install man) (do-hook module bundle-name :install man)
(do-hook module bundle-name :check man)
(if (empty? (get man :files)) (print "no files installed, is this a valid bundle?")) (if (empty? (get man :files)) (print "no files installed, is this a valid bundle?"))
(sync-manifest man)) (sync-manifest man))
(print "installed " bundle-name) (print "installed " bundle-name)