This content originally appeared on DEV Community and was authored by Juri Strumpflohner
Nx just crossed 2 million NPM downloads / week (see @nrwl/tao package on npm).
Victor Savkin@victorsavkin13:50 PM - 28 Jun 2022
And these are just the public downloads which do not include all the big fortune 500 companies using Nx on a daily basis to power their teams.
But it is not just about the number of downloads, but about the growth: Nx crossed 1 million per week in January 2022 and now 2 million in June 2022.
At this point you might now be wondering: what is Nx and what are monorepos? Let's start with monorepos first.
What is a monorepo?
The term "monorepo" is kind of misleading, but in principle it is a single (usually) Git repository hosting multiple projects. Those projects ideally form relationships among them by sharing and re-using functionality.
The advantage for developers? If done right, increased productivity by being able to directly use shared dependencies rather than going through versioning & publishing to internal registries, being able to easily run cross-cutting experiments, do a refactoring with a single PR rather than coordinating multiple releases & version updates, more visibility to other projects & greater developer mobility among teams. These are just some of the benefits.
The exact setup of a monorepo comes in different shapes, from using a single-version policy approach to colocating packages with their own node_modules
folders and applying symlinks for sharing code.
You can learn more at https://monorepo.tools.
What is Nx?
The official slogan: "a smart, fast and extensible build system". Does that mean it is a replacement for Webpack, Vite, SWC or Vite? Not really! At its core Nx is rather an orchestrator that applies these tools in the most efficient way.
Monorepo support is built into Nx's DNA. You can use Nx..
- light-weight and incrementally by leveraging it's powerful task scheduler. This is especially interesting if you already have a yarn/npm/pnpm workspace based monorepo setup and you want to enhance its capabilities. Check out this video for more details. If you happen to use Lerna you might want to read this.
- using its plugin system which comes with powerful support for Angular, React, Next, Next.js, Node and more. These plugins are more opinionated, but carefully crafted to provide the best possible developer experience and remove the burden of a manual tooling setup. Furthermore it comes with advanced features such as automated module federation setup or automated code migrations, a feature that is highly appreciated by large enterprises which otherwise struggle to keep their tooling up to date.
Learn more at nx.dev and on Youtube. You might also find this free Egghead course interesting.
How does Nx compare to other monorepo tools in the space?
- Nx offers the full spectrum, allowing for an incremental and lightweight adoption to providing a more complete and preconfigured experience based on plugins. It does not just help setup a monorepo and execute tasks, but also guides developers throughout the development lifecycle.
- Nx is faster than most of the current available alternatives. See the corresponding benchmark repository
- Nx provides the ability to distribute the execution of tasks efficiently across multiple machines, known as Distributed Task Execution (DTE). This is possible via Nx Cloud and provides major performance improvements on CI.
- Nx has a particular focus on the developer experience. A dedicated VSCode extension and a beautiful terminal output are just two examples for that.
- Nx is extensible, coming with its own devkit which allows to fully customize and tailor the Nx experience to your own needs.
Nx Community
There's a large community behind Nx which can be found at https://nx.dev/community.
This is interesting. Where can I learn more?
- Nx Documentation
- Nx GitHub repo
- @NxDevTools
- Community Slack
- Youtube Channel
- Egghead course
- monorepo.tools
Some of the latest announcements:
- Nrwl, Nx and Lerna joining forces
- Lerna 5.1 - New website, new guides, new Lerna example repo, distributed caching support and speed!
This content originally appeared on DEV Community and was authored by Juri Strumpflohner
Juri Strumpflohner | Sciencx (2022-06-29T14:29:00+00:00) Nx – The fastest growing monorepo solution in the JS ecosystem. Retrieved from https://www.scien.cx/2022/06/29/nx-the-fastest-growing-monorepo-solution-in-the-js-ecosystem/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.