Angular Enterprise
Angular Lib: Monorepository
- Libraries
- 24 links
- 5 min read
Find here the different monorepository tools and plugins allowing to efficiently develop several packages in a single repository. However, be careful, each tool and plugin has its own objective and so when you compare them you see that they do not offer the same functionalities. You have to know your own objective in order to pick the right libs and plugins out there.
Monorepository tools
pnpm workspaces and Yarn workspaces are features of JavaScript package managers, they allow to unify a single dependency folder and to orchestrate tasks. Lerna focuses on versioning and publishing packages to an npm registry. Nx is language agnostic, it offers various monorepository management features. Turborepo, created by Vercel, is another popular task runner for JavaScript monorepos. Let's see these five tools in detail:
- lerna is a tool for JavaScript that allows you to organize your package base in a single repository while offering orchestration and publication features in addition to unified management of node_modules. Since 2022 it is maintained by Nrwl, the company behind Nx. lerna
- pnpm is a package manager tool for Javascript that solves the problems of slowness and disk space encountered with the classic tools that are NPM and Yarn, in fact PNPM stores the files via a file system addressable by the content which allows to better manage the diff between the different package versions. In addition, the tool supports the monorepository architecture via its workspace functionality which makes it possible to unify a single node_modules in a high-performance way. pnpm
- yarnpkg is an alternative to npm, the JavaScript package manager bundled with Node.js. In addition, this one has more features such as plugins and support for monorepositories via the feature called Yarn workspaces. yarnpkg
- nx unlike the others is not a JavaScript package manager, Nx is a language agnostic tool that offers repository management tools such as smart builds, local and shared caching, rules and constraints, code generation, dependencies visualization, automatic updates and an open plugin system. nrwl/nx
- turborepo is a solution for managing monorepositories built by Vercel, a well-known company in the JavaScript world. It is a good alternative to Nx because it offers similar features such as caching and a task graph, although its code generation and constraint management features between the different libraries that you create are less complete. turborepo
Plugins for Nx Workspace
Plugins for programming languages
As we have seen above, Nx workspace is language agnostic, it allows developers to offer repository management tools for all languages, provided they have a developed plugin for each. Below are the plugins that allow you to extend support to the most used languages.
- nxrs/cargo is a community Nx plugin that offers support for the Rust programming language. nxrs/cargo
- nx-go offers support for the Go programming language. nx-go
- nxlv/python is an Nx plugin made by the community that offers support for the Python programming language. nxlv/python
- nx-dotnet is another Nx plugin that offers support for the .NET platform. This repository is now archived. nx-dotnet
Plugins for frameworks and libs
If you are working with Angular and also in a complex multi platforms or mobile and hybrid environment you will find below many tools for facilitating the work.
- nx-firebase provides support for Firebase projects in an Nx monorepo workspace in order to help being productive in building & deploying Firebase projects. nx-firebase
- nx-electron provides a set of ready to use utilities on Nx for developing and packaging cross platform desktop apps using Electron. nx-electron
- nativescript/nx is a plugin for Nx that helps initializing a new Nativescript cross platform mobile app project in a Nx monorepository. nativescript/nx
- nx-stylelint provides a set of features to lint your stylesheets with Stylelint. nx-stylelint
- nx-extensions provides a set of various plugins for working with many different frameworks and libraries such as: StencilJS, SvelteJS, ViteJS or Docusaurus. nx-extensions
- twittwer/nx-tools provides two plugins to help configure an environment. The first installs Compodoc and the second installs an original Storybook/Compodoc mashup. twittwer/nx-tools
Plugins for continuous integration
Use the full power of Nx workspace to build a robust and rapid continuous integration and deployment pipeline.
- nrwl-nx-action is a GitHub Action that facilitates wrapping Nrwl Nx commands in your workflows in order to optimize your tasks by running them only on affected projects. nrwl-nx-action
- nrwl/nx-orb is an Nx official starter template for Orb projects that provides examples for running various tasks such as build, test, and publish automatically on CircleCI with Orb-Tools. nrwl/nx-orb
- nrwl/nx-jenkins-build is an official example that demonstrates the usage of a distributed Jenkins pipeline in an Nx monorepository. This repository is now archived. nrwl/nx-jenkins-build
- nrwl/nx-azure-build is an official example that demonstrates the usage of a distributed Azure pipeline in an Nx monorepository. This repository is now archived. nrwl/nx-azure-build
- nx-cloud/travis-ci is an example made by the community that demonstrates the use of Nx Cloud in a Travis CI pipeline. nx-cloud/travis-ci
Utilities plugins
Find here all the various utilities made by the community that help working with Nx on a day-to-day basis.
- nxpm/nxpm-cli is a CLI aimed to offer an interactive experience for working with Nx workspace. This repository is now archived. nxpm/nxpm-cli
- bielik20/nx-plugins is a set of plugins for helping working with different matter: npm publishing and versioning, serverless architecture, jest-playwright... bielik20/nx-plugins
- dev-thought/nx-plugins is a collection of Nx plugins made by Mitko Tschimev and other developers. The main plugin is ng-deploy-it that helps deployment of applications in your current cloud provider such as Google Cloud, Amazon Web Services or Microsoft Azure. dev-thought/nx-plugins
- flowaccount/nx-plugins is another set of plugins that offers seamless deployments with frameworks like Serverless Framework and Amazon CDK for working with IaC architecture. flowaccount/nx-plugins