Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support generic commands #76

Open
divmain opened this issue Aug 25, 2016 · 0 comments
Open

Support generic commands #76

divmain opened this issue Aug 25, 2016 · 0 comments

Comments

@divmain
Copy link
Member

divmain commented Aug 25, 2016

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant