![]() In general, Monorepo is a single repository holding the code of multiple projects which may or may not be related. Managing code in one single repository can simplify the development of modular software in a big way. ![]() To address these and other problems related with management, scalability, and refactoring, some projects (like Babel, React, etc.) organize their codebases into a multi-package repository.Īlthough at first glance this approach looks like monolithic software development – which has a deserved bad reputation, the Monorepo idea is not incompatible with modular software development practices. Enter Lerna, which is “a tool for managing Javascript projects with multiple packages”, and it “optimizes the workflow around managing multi-package repositories with git and npm.” Here is where a variety of tools can help. However, making changes across many repositories is messy and difficult to track, and testing across repositories gets complicated really fast. Splitting up large codebases into separate independently versioned packages is extremely useful for code sharing. Welcome to MonorepoĬonsider the following challenge that can be found in Lerna’s site. but one of the easiest and straightforward ways to do it is with yarn. ![]() There are some tools that help managing this architecture like Lerna, Bazel (from Google), Buck (from Facebook), etc. This multi-package structure is already in practice by different organizations and is known as Monorepo. A good way to structure the app is to write it in a per-feature basis, where each feature lives on its own place.Ī common and simple pattern is to split the application in different folders, but this can be taken further by creating different packages, that can be shared among different applications where each package represents a particular feature, component or functionality. ![]() This growth can quickly become difficult to track. The folder structure and module management of an application can become very complex and cumbersome as the application grows. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |