useWorkspaces: if you want to enable Yarn Workspaces, you will have to tell it to Lerna, setting this option to true.npmClient: you can define in you want to use Yarn, Npm or your favourite client.We prefer fixed mode to keep all packages with the same version and reduce headaches to users. Take care that independent mode will create one tag for each package that will be published with its own version. It could be a semver value (called fixed mode) or independent if you want to let packages define their own version. In our case, we use core/*, plugins/* and tools/*. They could be explicit ( packages/pkg1) or, if a folder has several packages, you can use * wildcard. packages: this array defines the location for all packages that conforms the monorepo. This will generate files like package.json or lerna.json (packages structure is shown as example, but not generated). The initial setup is really simple, you only need to create a new repository and run lerna init to initialize the monorepo. Since Yarn 1.0, this feature is enabled by default, you only need a root package.json to setup them.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |