Nx: Extensible Dev Tools for Monorepos

Victor Savkin
Nx Devtools
Published in
4 min readFeb 22, 2019

--

Nx is a set of extensible dev tools for monorepos. Today we are happy to announce the release Nx 7.6, which brings a ton of improvements and bug fixes. We are also happy to unveil nx.dev, the brand new documentation site for Nx!.

This release is an important milestone for Nx, so instead of covering what is new, I’d like to instead talk about what Nx is and why we’ve built it.

Victor Savkin is a co-founder of nrwl.io, providing Angular consulting to enterprise teams. He was previously on the Angular core team at Google.

Nx Helps You

Use Modern Tools

Using Nx, you can add Cypress, Jest, Prettier, and Nest into your dev workflow. Nx sets up these tools and allows you to use them seamlessly.

Of course, it’s not the case that Cypress is always better than Protractor, or Nest is always better than say Express. There are tradeoffs. But in many situations, for many projects, these innovative tools offer a lot of advantages.

Adding these tools to the dev workflow is challenging in a regular CLI project. The choice you have is not between Protractor or Cypress, but between a hacked-up setup for Cypress and a great CLI setup for Protractor.

Nx changes that!

Run ng g app my-angular-app to get an application where running ng test my-angular-app will use Jest instead of Karma, and running ng e2e my-angular-app-e2e will use Cypress instead of Protractor. Typings, watching for changes, source maps — everything works out of the box. If you prefer to stick with the familiar Karma and Protractor, invoke ng g app my-angular-app --e2eTestRunner=protractor --unitTestRunner=karma instead.

Build Full-Stack Applications

With Nx, you can build full-stack applications using Angular and Node.js frameworks such as Nest and Express. You can share code between the frontend and the backend. And you can use the familiar ng build/test/serve commands to power the whole dev experience.

Run ng g node-app my-node-app to get a Nest application that you can run using ng serve my-node-app, build using ng build my-node-app, and test using ng test my-node-app.

Develop Like Google

Modern systems don’t just have a backend and a frontend. Instead, they comprise dozens of services which are used by several frontends built for different platforms (desktop, mobile, etc..) by different teams. Making this development process work is extremely challenging.

From Google to Facebook, Uber, Twitter and more, a good amount of large software companies handle this challenge by taking a monorepo approach. And they have been doing so successfully for years. Nx brings this approach to the mainstream.

This is the most interesting part of Nx. The part that makes so many things so much easier, that it has a transformative effect on a team and even on an organization. This is also the main reason why so many Fortune 100 companies are adopting Nx.

Nx provides advanced tools which help them scale development. Nx also helps them enforce their organization’s standards and community best practices.

See It All in Action

Nx is Built to Solve Real Problems

At Nrwl, we help companies build ambitious applications, and Nx is the distillation of our experience.

Building a full-stack development toolkit is not hard, and neither is adopting Cypress into your development workflow.

It is an entirely different story if your solution has to work in different companies, with unique tech stacks and development cultures. In the companies where one team may insist on using Protractor, whereas the rest of the company will use Cypress. Where there are so many teams working on so many related projects, that you have no choice but to rely on advanced code analysis and tools to keep the whole thing running.

This is why Nx is awesome. It’s not a toy implementation of a cool idea — it’s a toolkit for building applications using modern tools and development practices that scale.

Learn More

Please checkout nx.dev to learn more.

Victor Savkin is a co-founder of Nrwl. We help companies develop like Google since 2016. We provide consulting, engineering and tools.

If you liked this, click the 👏 below so other people will see this here on Medium. Follow @victorsavkin to read more about monorepos, Nx, Angular, and React.

--

--

Nrwlio co-founder, Xoogler, Xangular. Work on dev tools for TS/JS. @NxDevTools and Nx Cloud architect. Calligraphy and philosophy enthusiast. Stoic.