Turborepo API 参考

Turborepo 的 API 参考分为以下几个部分:

¥Turborepo's API reference is broken up into the following sections:

配置

¥Configuration

命令

¥Commands

软件包

¥Packages

标志语法

¥Flag syntax

需要值的选项可以用等号传递,需要空格时请使用引号。

¥Options that require a value can be passed with an equals sign, using quotes when spaces are needed.

Terminal
--opt=value
--opt="value with a space"
--opt value
--opt "value with a space"

全局标志

¥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.