guybedford / chomp

'JS Make' - parallel task runner for the frontend ecosystem with a JS extension system.
https://chompbuild.com
Apache License 2.0
138 stars 7 forks source link

Task arguments #7

Closed guybedford closed 2 years ago

guybedford commented 2 years ago

It would be useful to define arguments for tasks to allow eg chp build "custom data" style executions.

One approach would be to have special types of tasks which explicitly take arguments, defining their arguments (task-defined).

Alternatively we could simply entirely rely on the process model of argv, so that all tasks can have any number of arguments provided (caller-defined).

Invocation in task-defined would be automatic - chp custom-task custom-data

Invocation in caller-defined would require something like -- - chp custom-task -- custom-data.

The last is already familiar to npm scripts users, so may actually be ok.

Note that only tasks that do not define targets can be permitted arguments.

guybedford commented 2 years ago

This has now been implemented.