feat(plugin api): task match can now be a function

This commit is contained in:
Guillaume Chau
2018-10-29 14:46:31 +01:00
parent da66f93edb
commit d11290a0e1
3 changed files with 10 additions and 2 deletions
+8
View File
@@ -350,6 +350,14 @@ api.describeTask({
})
```
You can also use a function for `match`:
```js
api.describeTask({
match: (command) => /vue-cli-service serve/.test(command),
})
```
### Task icon
It can be either a [Material icon](https://material.io/tools/icons) code or a custom image (see [Public static files](#public-static-files)):