yarn 工作区
显示有关你工作区的信息。
什么是工作区?
如需详细了解工作区,请查看以下链接
命令
yarn workspaces info [--json]
此命令将显示当前项目的工作区依赖关系树。
yarn workspaces info
yarn workspaces vx.x.x
{ "create-subscription": {
"location": "packages/create-subscription",
"workspaceDependencies": [],
"mismatchedWorkspaceDependencies": []
},
...
"react-noop-renderer": {
"location": "packages/react-noop-renderer",
"workspaceDependencies": [
"react-reconciler"
],
"mismatchedWorkspaceDependencies": []
},
"react-reconciler": {
"location": "packages/react-reconciler",
"workspaceDependencies": [],
"mismatchedWorkspaceDependencies": []
}, ... }
yarn workspaces run <command>
此命令将在各工作区中运行选定的 Yarn 命令。
yarn workspaces run test
此命令将为各工作区调用测试脚本。
此命令还将传递标志,并且对 CI 流程很有用。
yarn workspaces run test --ci