mirror of
https://github.com/janet-lang/janet
synced 2024-06-26 07:03:16 +00:00
Add jpm run
and jpm rules
This commit is contained in:
parent
530d94a4b9
commit
4ad1bdec15
11
auxbin/jpm
11
auxbin/jpm
|
@ -818,6 +818,9 @@ Subcommands are:
|
||||||
test : run tests. Tests should be .janet files in the test/ directory relative to project.janet.
|
test : run tests. Tests should be .janet files in the test/ directory relative to project.janet.
|
||||||
deps : install dependencies for the current project.
|
deps : install dependencies for the current project.
|
||||||
clear-cache : clear the git cache. Useful for updating dependencies.
|
clear-cache : clear the git cache. Useful for updating dependencies.
|
||||||
|
run rule : run a rule. Can also run custom rules added via (phony "task" [deps...] ...)
|
||||||
|
or (rule "ouput.file" [deps...] ...).
|
||||||
|
rules : list rules available with run.
|
||||||
|
|
||||||
Keys are:
|
Keys are:
|
||||||
--modpath : The directory to install modules to. Defaults to $JANET_MODPATH, $JANET_PATH, or (dyn :syspath)
|
--modpath : The directory to install modules to. Defaults to $JANET_MODPATH, $JANET_PATH, or (dyn :syspath)
|
||||||
|
@ -863,6 +866,12 @@ Flags are:
|
||||||
[]
|
[]
|
||||||
(local-rule "install-deps"))
|
(local-rule "install-deps"))
|
||||||
|
|
||||||
|
(defn- list-rules
|
||||||
|
[]
|
||||||
|
(import-rules "./project.janet")
|
||||||
|
(def ks (sort (seq [k :keys (dyn :rules)] k)))
|
||||||
|
(each k ks (print k)))
|
||||||
|
|
||||||
(def- subcommands
|
(def- subcommands
|
||||||
{"build" build
|
{"build" build
|
||||||
"clean" clean
|
"clean" clean
|
||||||
|
@ -871,6 +880,8 @@ Flags are:
|
||||||
"help" help
|
"help" help
|
||||||
"deps" deps
|
"deps" deps
|
||||||
"clear-cache" clear-cache
|
"clear-cache" clear-cache
|
||||||
|
"run" local-rule
|
||||||
|
"rules" list-rules
|
||||||
"uninstall" uninstall-cmd})
|
"uninstall" uninstall-cmd})
|
||||||
|
|
||||||
(def- args (tuple/slice (dyn :args) 1))
|
(def- args (tuple/slice (dyn :args) 1))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user