mirror of
https://github.com/go-task/task.git
synced 2025-12-16 19:57:43 +01:00
Improvements on documentation
This commit is contained in:
@@ -27,6 +27,9 @@ It aims to be simpler and easier to use then [GNU Make][make].
|
|||||||
- [Go's template engine](#gos-template-engine)
|
- [Go's template engine](#gos-template-engine)
|
||||||
- [Help](#help)
|
- [Help](#help)
|
||||||
- [Silent mode](#silent-mode)
|
- [Silent mode](#silent-mode)
|
||||||
|
- [Dry Run Mode](#dry-run-mode)
|
||||||
|
- [Ignore errors](#ignore-errors)
|
||||||
|
- [Output syntax](#output-syntax)
|
||||||
- [Watch tasks](#watch-tasks-experimental)
|
- [Watch tasks](#watch-tasks-experimental)
|
||||||
- [Examples](#examples)
|
- [Examples](#examples)
|
||||||
- [Alternative task runners](#alternative-task-runners)
|
- [Alternative task runners](#alternative-task-runners)
|
||||||
|
|||||||
@@ -89,3 +89,44 @@ tasks:
|
|||||||
cmds:
|
cmds:
|
||||||
- echo "{{.FOOBARBAZ}}"
|
- echo "{{.FOOBARBAZ}}"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Version 2.1
|
||||||
|
|
||||||
|
Version 2.1 includes a global `output` option, to allow having more control
|
||||||
|
over how commands output are printed to the console
|
||||||
|
(see [documentation][output] for more info):
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '2'
|
||||||
|
|
||||||
|
output: prefixed
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
server:
|
||||||
|
cmds:
|
||||||
|
- go run main.go
|
||||||
|
prefix: server
|
||||||
|
```
|
||||||
|
|
||||||
|
From this version it's not also possible to ignore errors of a command or task
|
||||||
|
(check documentatio [here][ignore_errors]):
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '2'
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
example-1:
|
||||||
|
cmds:
|
||||||
|
- cmd: exit 1
|
||||||
|
ignore_error: true
|
||||||
|
- echo "This will be print"
|
||||||
|
|
||||||
|
example-2:
|
||||||
|
cmds:
|
||||||
|
- exit 1
|
||||||
|
- echo "This will be print"
|
||||||
|
ignore_error: true
|
||||||
|
```
|
||||||
|
|
||||||
|
[output]: https://github.com/go-task/task#output-syntax
|
||||||
|
[ignore_errors]: https://github.com/go-task/task#ignore-errors
|
||||||
|
|||||||
Reference in New Issue
Block a user