This content originally appeared on DEV Community 👩💻👨💻 and was authored by Ravgeet Dhillon
Suppose that you run a software development agency and you want to enforce a common linting rule set and formatting guidelines for all of your JavaScript projects. You could install ESLint and Prettier in each of your projects. However, your company manages more than a hundred different projects, with custom rules for both ESLint and Prettier. So, if you decide to add or deprecate some rules, you'll have to update the rule sets in all of those projects.
A monorepo can help solve this issue. You can put all of your configuration code in a master repository, publish it as an npm package, and then import the npm package into your projects. Next time you want to change the rules, you only need to alter the monorepo project and the change will be reflected in all of your projects, as they're dependent on the monorepo project.
If you follow the steps in this tutorial, you’ll see how you can publish NPM packages using Lerna and keep your packages’ code in a monorepo.
Read the full blog on Fusebit.
Thanks for reading 💜
I publish a monthly newsletter in which I share personal stories, things that I am working on, what is happening in the world of tech, and some interesting dev-related posts which I come across while surfing the web.
Connect with me through Twitter • LinkedIn • GitHub or send me an Email.
— Ravgeet, Full Stack Developer and Technical Content Writer
This content originally appeared on DEV Community 👩💻👨💻 and was authored by Ravgeet Dhillon
Ravgeet Dhillon | Sciencx (2022-10-14T03:49:03+00:00) Authoring NPM Packages with Monorepos. Retrieved from https://www.scien.cx/2022/10/14/authoring-npm-packages-with-monorepos/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.