You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

workspaces.md 1.6 kB

3 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. ---
  2. id: docs_cli_workspaces
  3. guide: docs_cli
  4. layout: guide
  5. ---
  6. <p class="lead">Show information about your workspaces.</p>
  7. ### What is a workspace? <a class="toc" id="toc-what-is-a-workspace" href="#toc-what-is-a-workspace"></a>
  8. To learn more about workspaces, check these links:
  9. - [Workspaces in Yarn]({{url_base}}/blog/2017/08/02/introducing-workspaces)
  10. - [Workspaces]({{url_base}}/docs/workspaces)
  11. ### Commands <a class="toc" id="toc-commands" href="#toc-commands"></a>
  12. ##### `yarn workspaces info [--json]` <a class="toc" id="toc-yarn-workspaces-info" href="#toc-yarn-workspaces-info"></a>
  13. This command will display the workspace dependency tree of your current project.
  14. ```sh
  15. yarn workspaces info
  16. ```
  17. ```
  18. yarn workspaces vx.x.x
  19. { "create-subscription": {
  20. "location": "packages/create-subscription",
  21. "workspaceDependencies": [],
  22. "mismatchedWorkspaceDependencies": []
  23. },
  24. ...
  25. "react-noop-renderer": {
  26. "location": "packages/react-noop-renderer",
  27. "workspaceDependencies": [
  28. "react-reconciler"
  29. ],
  30. "mismatchedWorkspaceDependencies": []
  31. },
  32. "react-reconciler": {
  33. "location": "packages/react-reconciler",
  34. "workspaceDependencies": [],
  35. "mismatchedWorkspaceDependencies": []
  36. }, ... }
  37. ```
  38. ##### `yarn workspaces run <command>` <a class="toc" id="toc-yarn-workspaces-run" href="#toc-yarn-workspaces-run"></a>
  39. This will run the chosen Yarn command in each workspace.
  40. ```sh
  41. yarn workspaces run test
  42. ```
  43. This will invoke the test script for each workspace.
  44. This will also pass forward flags and can be useful for CI processes.
  45. ```sh
  46. yarn workspaces run test --ci
  47. ```

js yarn包管理组件依赖分析

Contributors (1)