这是indexloc提供的服务,不要输入任何密码
Skip to content

Improve pipelines documentation #933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 26 additions & 13 deletions docs/pages/docs/features/pipelines.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@ An example Pipeline configuration in `turbo.json`:
"dependsOn": ["^build"]
},
"test": {
"dependsOn": ["build"]
"dependsOn": ["^build"],
"outputs": [""]
},
"deploy": {
"dependsOn": ["build", "test", "lint"]
"dependsOn": ["build", "test", "lint"],
"outputs": [""]
},
"lint": {}
"lint": {
"outputs": [""]
}
}
}
```
Expand Down Expand Up @@ -73,20 +77,24 @@ What you are declaring here in the `pipeline` object of the `turbo` configuratio
"build": {
// A package's `build` task depends on that package's
// topological dependencies' and devDependencies'
// `build` tasks being completed
// `build` tasks being completed first
// (that's what the `^` symbol signifies).
"dependsOn": ["^build"]
},
"test": {
// A package's `test` task depends on the `build`
// task of the same package being completed.
"dependsOn": ["build"]
// A package's `test` task depends on that package's
// topological dependencies' and devDependencies'
// `build` tasks being completed first
// (that's what the `^` symbol signifies).
"dependsOn": ["^build"],
"outputs": [""]
},
"deploy": {
// A package's `deploy` task depends on the `build`,
// `test`, and `lint` tasks of the same package
// being completed.
"dependsOn": ["build", "test", "lint"]
"dependsOn": ["build", "test", "lint"],
"outputs": [""]
},
// A package's `lint` task has no dependencies and
// can be run whenever.
Expand Down Expand Up @@ -124,10 +132,12 @@ An empty dependency list (`dependsOn` is either undefined or `[]`) means that a
"$schema": "https://turborepo.org/schema.json",
"pipeline": {
// ... omitted for brevity

// A package's `lint` command has no dependencies and can be run at
// whenever.
"lint": {}
"lint": {
"outputs": [""]
}
}
}
```
Expand Down Expand Up @@ -155,13 +165,16 @@ For these cases, you can express these relationships in your `pipeline` configur
"dependsOn": ["^build"]
},
"test": {
"dependsOn": ["build"]
"dependsOn": ["^build"],
"outputs": [""],
},
"deploy": {
"dependsOn": ["test"]
"dependsOn": ["test", "build"],
"outputs": [""]
},
"frontend#deploy": {
"dependsOn": ["ui#test", "backend#deploy", "backend#health-check"]
"dependsOn": ["ui#test", "backend#deploy"],
"outputs": [""]
}
}
}
Expand Down