Support a commands option in Interlock config files. This option would accept an object, with command strings for keys and functions for values. Each command can be invoked by ilk run COMMAND_KEY_STRING and fully supports the presets composability.
Each command function would be provided an object for its single argument, with several keys. Among them:
compile, a function that accepts a Interlock config and returns a promise
config, the validated config object
exec, a promise interface to invoke external processes
run, a function that accepts a single argument (another command key string) and returns a promise
The function should return a Promise. Commands can be composed (across presets) by using Promise.all (for parallel) or Promise-chaining (for sequence).
Support a
commands
option in Interlock config files. This option would accept an object, with command strings for keys and functions for values. Each command can be invoked byilk run COMMAND_KEY_STRING
and fully supports the presets composability.Each command function would be provided an object for its single argument, with several keys. Among them:
compile
, a function that accepts a Interlock config and returns a promiseconfig
, the validated config objectexec
, a promise interface to invoke external processesrun
, a function that accepts a single argument (another command key string) and returns a promiseThe function should return a
Promise
. Commands can be composed (across presets) by usingPromise.all
(for parallel) or Promise-chaining (for sequence).