Skip to content

Support generic commands #76

Description

@divmain

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions