Skip to content

Commit 84f02a8

Browse files
authored
docs: mention that method key is allowed at root level (#2233)
1 parent 55d1aa2 commit 84f02a8

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

website/docs/usage.mdx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,10 @@ tasks:
781781

782782
If you prefer these check to be made by the modification timestamp of the files,
783783
instead of its checksum (content), just set the `method` property to
784-
`timestamp`.
784+
`timestamp`. This can be done at two levels:
785+
786+
At the task level for a specific task:
787+
785788

786789
```yaml
787790
version: '3'
@@ -797,6 +800,24 @@ tasks:
797800
method: timestamp
798801
```
799802

803+
At the root level of the Taskfile to apply it globally to all tasks:
804+
805+
```yaml
806+
version: '3'
807+
808+
method: timestamp # Will be the default for all tasks
809+
810+
tasks:
811+
build:
812+
cmds:
813+
- go build .
814+
sources:
815+
- ./*.go
816+
generates:
817+
- app{{exeExt}}
818+
```
819+
820+
800821
In situations where you need more flexibility the `status` keyword can be used.
801822
You can even combine the two. See the documentation for
802823
[status](#using-programmatic-checks-to-indicate-a-task-is-up-to-date) for an

0 commit comments

Comments
 (0)