1/4/2024 0 Comments Yarn workspaces publishDoing this allows us to cleanly decouple projects from one another, since you don't have to merge all their dependencies in one huge unmaintainable list. Said another way, we strictly enforce your workspaces dependencies. Only the dependencies depended upon by a workspace can be accessed. Workspaces have two important properties: This requirement got removed with the 2.0 release in order to help standalone projects to progressively adopt workspaces (for example by listing their documentation website as a separate workspace). Worktrees used to be required to be private (ie list "private": true in their package.json). If they're named, other workspaces will be able to properly cross-reference them. Note that because worktrees are defined with an otherwise regular package.json file, they also are valid workspaces themselves. This doesn't matter in the typical workspace setup because there's usually a single worktree defined in the project-level package.json, but if you try to setup nested workspaces then you must make sure that the nested worktree is defined as a valid workspace of its parent worktree (otherwise Yarn won't find its correct parent folder). They must be connected in some way to the project-level package.json file. For example, if you want all folders within the packages folder to be workspaces, just add packages/* to this array. They must declare a workspaces field which is expected to be an array of glob patterns that should be used to locate the workspaces that make up the worktree. What makes them special is that they have the following properties: Worktrees are defined through the traditional package.json files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |