interlockjs / interlock

JS bundler - inspired by Git, built on Babel.
MIT License
72 stars 7 forks source link

Support generic commands #76

Open divmain opened 8 years ago

divmain commented 8 years ago

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:

The function should return a Promise. Commands can be composed (across presets) by using Promise.all (for parallel) or Promise-chaining (for sequence).