1
0
mirror of https://github.com/go-task/task.git synced 2025-11-27 22:38:20 +02:00

Allow shorter syntax for tasks with default configuration

Closes #194
Closes #240

Co-authored-by: Jaedle <dennis.jekubczyk@gmail.com>
This commit is contained in:
Andrey Nering
2019-12-07 21:28:02 -03:00
parent b7bcd204b4
commit b7b752b92f
6 changed files with 113 additions and 9 deletions

View File

@@ -840,6 +840,22 @@ $ task default
> The `output` option can also be specified by the `--output` or `-o` flags.
## Short task syntax
Starting on Task v3, you can now write tasks with a shorter syntax if they
have the default settings (e.g. no custom `env:`, `vars:`, `silent:` , etc):
```yaml
version: '3'
tasks:
build: go build -v -o ./app{{exeExt}} .
build:
- task: build
- ./app{{exeExt}} -h localhost -p 8080
```
## Watch tasks
If you give a `--watch` or `-w` argument, task will watch for file changes