ALPHA - Not yet released
Note: currently only supports .clj
files.
Note: no explicit windowa support.
makejack.api.tool
dispatch-main
(dispatch-main tool-name tool-syntax tool-fn extra-options args)
Dispatch main to tool-fn, parsing command-line args with extra-options.
Uses cli-options/cli-options with extra-options to parse an options map and args. Loads the mj config file and the project.edn file with the profile specified by any –profile option.
Executes tool-fn with verbose and debug nound according to the parsed options.
The tool-fn should have the following signature: (fn [options args {:keys [mj project] :as config}])
parse-options
(parse-options args extra-options)
Parse the cli options, with the given extra options.
parse-options-and-apply-to-config
(parse-options-and-apply-to-config args extra-options tool-name tool-syntax)
Return a map with :arguments, :options, :errors, :config keys.
with-makejack-tool
macro
(with-makejack-tool [tool-name options project] & body)
When verbose, output a message with the tool and the project co-ordinates.
with-shutdown-agents
macro
(with-shutdown-agents & body)
Ensure that (shutdown-agents) is called after the block.