Skip to content

Commit

Permalink
Update 4 - Tasks.md (#319)
Browse files Browse the repository at this point in the history
Fixed all T.source to T.sources
  • Loading branch information
h2000 authored and lihaoyi committed May 11, 2018
1 parent cec13be commit 032ae8b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/pages/4 - Tasks.md
Expand Up @@ -32,7 +32,8 @@ def run(mainClsName: String) = T.command{
}
```

Here, we have two `T.sources`, `sourceRoot` and `resourceRoot`, which act as the

Here, we have two `T.sources`s, `sourceRoot` and `resourceRoot`, which act as the
roots of our task graph. `allSources` depends on `sourceRoot` by calling
`sourceRoot()` to extract it's value, `classFiles` depends on `allSources` the
same way, and `jar` depends on both `classFiles` and `resourceRoot`.
Expand Down Expand Up @@ -71,7 +72,7 @@ arbitrary result from it's inputs.
There are four primary kinds of *Tasks* that you should care about:

- [Targets](#targets), defined using `T{...}`
- [Sources](#sources), defined using `T.source{...}`
- [Sources](#sources), defined using `T.sources{...}`
- [Commands](#commands), defined using `T.command{...}`

### Targets
Expand Down Expand Up @@ -121,13 +122,13 @@ def sourceRootPath = pwd / 'src
def sourceRoots = T.sources{ sourceRootPath }
```

`Source`s are defined using `T.source{ ... }`, taking one-or-more
`Source`s are defined using `T.sources{ ... }`, taking one-or-more
`ammonite.ops.Path`s as arguments. A `Source` is a subclass of
`Target[Seq[PathRef]]`: this means that it's build signature/`hashCode` depends
not just on the path it refers to (e.g. `foo/bar/baz`) but also the MD5 hash of
the filesystem tree under that path.

`T.source` also has an overload which takes `Seq[PathRef]`, to let you
`T.sources` also has an overload which takes `Seq[PathRef]`, to let you
override-and-extend source lists the same way you would any other `T{...}`
definition:

Expand Down

0 comments on commit 032ae8b

Please sign in to comment.