lukeed / taskr

A fast, concurrency-focused task automation tool.
MIT License
2.53k stars 75 forks source link

Function option for start, serial, and parallel #292

Open timhall opened 6 years ago

timhall commented 6 years ago

Allowing function as argument to start, serial, and parallel would allow tasks to be composed without having to export everything including tasks that are not meant to be called directly.

function * build(task) {
  yield task.parallel([js, css]);
}

// "internal" functions 
function * js(task) {}
function * css(task) {}

module.exports = {
  build
};
lukeed commented 6 years ago

Thanks! :raised_hands: