![]() ![]() We decided to unify all configurations, because handle several repositories would not be realistic and would have all things replicated in all repositories. We had some concerns about the Verdaccio ecosystem we want to build, such amount of repositories requires hard work for maintenance by each one with their own dependencies, scripts, configurations, etc. Background and tools Ī year ago, Juan and I met in Madrid, Spain, and were talking about the roadmap for Verdaccio 4, the scope of the projects and more. ![]() This article is the first part of a series of articles where we will try to explain our motivation about to set up by your own, improve the management and workflows (CI, code quality, etc). Now, we are proud to announce our monorepo, our big ecosystem joined in only one repository. There are many examples out there that Javascript developer use nowadays, like Babel, Create React App or Material UI. We need a monorepo.Ī monorepo is a project configuration to manage a collection of dependencies in a simple and unified way. So, we needed to simplify and unify them to make it easier. We saw a problem, these configurations entropy made harder to work with all the projects. This fact transforms a simple maintenance operation, like updating a common dependency, into a real hard work. Using the expo-yarn-workspaces.symlinks string array you can define a list of packages to symlink under the project's node_modules folder after installing the workspaces' dependencies.Verdaccio is a project with a big ecosystem, composed by several projects, each one with its own configurations and ways to manage. Sometimes an npm package must be located in the project's node_modules folder for things to work properly. You can configure workspaces using the expo-yarn-workspaces field in each workspace package's package.json file. You can further customize this configuration object before exporting it, if needed.Īside: when starting the project, run expo start -clear so Metro uses the latest configuration instead of working with cached values. It configures Metro to include packages from the workspace root, resolves symlinked packages, excludes modules from Haste's module system, and exclude modules in the native Android and Xcode projects. The expo-yarn-workspaces package defines a Metro configuration object that makes Metro work with Yarn workspaces in the Expo repo. exports = createMetroConfiguration ( _dirname ) It generates an entry module for the app that assumes your app's root component is exported from App.js ( App.$ = require ( 'expo-yarn-workspaces' ) module. These symlinks point to the respective packages installed in the workspace root. It creates symlinks for packages that some programs expect to exist under node_modules, namely expo and react-native. Add a postinstall script to package.jsonĪdd "postinstall": "expo-yarn-workspaces postinstall" under the "scripts" object in the app's package.json file. This adds scripts provided by expo-yarn-workspaces to the project under its node_modules/.bin directory and also defines modules the app will use. Add expo-yarn-workspaces as a devDependency All of the steps are important and need to be followed carefully. How apps work with workspacesĮach Expo app in the repository that is intended to work with Yarn workspaces (as opposed to being tested in a non-workspace environment) does the steps described below. Note: This package runs only on macOS and Linux. It finesses Yarn workspaces, Metro, and the Expo repository to work together. This is a package that provides support for Yarn workspaces within monorepos like the Expo repository. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |