Turborepo API 参考
Turborepo 的 API 参考分为以下几个部分:
¥Turborepo's API reference is broken up into the following sections:
配置
¥Configuration
Configuring turbo.json
Configure the behavior of `turbo`.
Package Configurations
Create configurations specific to a package.
System environment variables
Change `turbo`'s behavior using environment variables.
File glob specification
Define files for `turbo` to use.
命令
¥Commands
run
Run tasks using `turbo`.
watch
Dependency-aware, single-process task watcher.
prune
Create partial monorepos for target workspaces.
boundaries
Enforce best practices in your monorepo.
ls
List packages in your monorepo.
query
Run GraphQL queries against your monorepo.
generate
Extend your Turborepo with new apps and packages.
login
Log in to your Remote Cache provider.
logout
Log out of your Remote Cache provider.
link
Link your repository to Remote Cache.
unlink
Disconnect your repository from Remote Cache.
scan
Enable the fastest defaults for your Turborepo.
bin
Get the path to the `turbo` binary.
telemetry
Manage telemetry for the machine.
软件包
¥Packages
create-turbo
Get started with Turborepo using an example.
eslint-config-turbo
Find environment variables not listed in `turbo.json`.
turbo-ignore
Skip work using `turbo-ignore`.
@turbo/gen
Type definitions for Turborepo generators.
标志语法
¥Flag syntax
需要值的选项可以用等号传递,需要空格时请使用引号。
¥Options that require a value can be passed with an equals sign, using quotes when spaces are needed.
全局标志
¥Global flags
--color
强制使用颜色,即使在非交互式终端中也是如此。这对于在支持渲染颜色的 CI 环境(例如 GitHub Actions)中启用颜色输出非常有用。
¥Forces the use of color, even in non-interactive terminals. This is useful for enabling color output in CI environments like GitHub Actions that have support for rendering color.
--no-color
即使在交互式终端中,也隐藏终端输出的颜色。
¥Suppresses color in terminal output, even in interactive terminals.
--no-update-notifier
禁用更新通知。在 CI 环境中运行时,此通知将自动禁用,但也可以通过此标志手动禁用。
¥Disables the update notification. This notification will be automatically disabled when running in CI environments, but can also be disabled manually via this flag.
或者,你可以使用 TURBO_NO_UPDATE_NOTIFIER
环境变量 禁用通知。
¥Alternatively, you can disable the notification using the TURBO_NO_UPDATE_NOTIFIER
environment variable.