Debian Codegraph @

book/tasks/README.md

raw symbols SCIP
1 # Tasks
2
3 A task is a named unit of work which can be executed in series or parallel. Define smaller tasks to form larger tasks.
4
5 ```go
6
7 var S = do.S, M = do.M, Context = do.Context
8
9 func tasks(p *do.Project) {
10 p.Task("assets", nil, func(c *Context) {
11 c.Run("webpack")
12 })
13
14 project.Task("build", S{"build"}, func(c *Context) {
15 c.Run("go run main.go", M{"$in": "cmd/app"})
16 })
17 }
18 ```