Defining flags/arguments for a task?

Heya! I just found this and from the docs I don't believe it's possible, but I was wondering if it was possible to define flags/options and arguments for tasks? For example, our project has a custom linting command and we want to have everything discoverable by a taskfile.yml (instead of having a combination of bash scripts, package.json aliases, random standalone executables, etc) Is there any plans to implement this, or any ways to get it somehow? e.g. given a taskfile.yml like so:
tasks:
lint:js:
desc: Lints JavaScript files
options:
fix:
type: boolean
desc: Automatically fix problems
short: f
args:
files:
desc: Files to lint
multiple: true
cmd: 'dev-tooling/packages/eslint/bin/eslint.js {{.files}} {.fix}'
tasks:
lint:js:
desc: Lints JavaScript files
options:
fix:
type: boolean
desc: Automatically fix problems
short: f
args:
files:
desc: Files to lint
multiple: true
cmd: 'dev-tooling/packages/eslint/bin/eslint.js {{.files}} {.fix}'
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?