Nx is a smart, extensible and toolable build framework. In this post, I’ll show you how it works using 12 diagrams.
Let’s create a new Nx workspace.
> npx create-nx-workspace — preset=empty
This creates the following:
Nx is a VSCode of build tools: it has a powerful core that you can build plugins for.
We at Nrwl want to make Modern Angular synonymous with Nx, and using good linting tools is a big part of this story.
The Angular CLI (and Nx) used to use TSLint for Angular applications and libraries. Because TSLint was deprecated, we added the ESLint support for Angular apps and libs in Nx 10, and made it the default option in Nx 11.
To help teams with existing workspaces to move from the discontinued TSLint to ESLint, we have recently added a generator that can do it automatically.
The following video shows how to use the generator. Simply run:
> nx g convert-tslint-to-eslint --project=SELECTED_PROJECT
The command will create eslintrc files, remove tslint.json files, and will update the builder for the project to use ESLint.
Regardless of how good the Angular core is, if developers have to use Karma, Protractor, and TSLint (no one’s first choices at this point), Angular will feel outdated.
As I mentioned in my blog post “Angular is an Onion” the team at Google is well-positioned to design core APIs and capabilities and is at a disadvantage compared to the Angular community when it comes…
For teams who want full control of their data, Nx Private Cloud brings the benefits of distributed computation caching and workspace analytics to your cloud. Available in two editions — Community and Enterprise — Nx Private Cloud is ready for teams of all shapes and sizes, today.
If you have a monorepo that is powered by Lerna, Yarn, PNPM, or NPM, you can transform it into an Nx workspace by running this command:
See it in action (3-minute video):
npx add-nx-to-monorepo will do the following:
nx.jsonlisting all the projects in the workspace
tsconfigfile mapping all projects in there
After you run the command above, you can run any npm script using Nx. For instance, if
myproj has a
build script, you can invoke…
Lerna offers several great affordances for developing multiple projects in the same repo, and it’s used by many open source projects. Nx is developed by former Googlers and provides a richer monorepo-based developer experience. Nx has a lot more in common with the tools you find at companies like Google, Uber, and Twitter.
In addition to comparing Lerna and Nx, I’ll show how to migrate your repository from Lerna to Nx.
The following is a summary of the video, plus a few…
A year and a half ago we announced our second attempt to add a Bazel backend to Nx.. Unfortunately this is not going to happen in the near future. I’d like to provide some context about why we wanted to do it and why we decided that this isn’t the time.
We started the Bazel effort for the following two reasons.
We really wanted to add computation caching to Nx and Bazel had good support for it. So one way to add computation caching to Nx was to run Nx on top of Bazel.
Reading “Zen and the Art of Motorcycle Maintenance” made me want to understand the tools I use, to tinker with them, to truly make them my own.
I already had an ErgoDox, a highly-customized editor, high income, and a lot of free time — a good foundation for a multi-year obsession with customization.
This post is the reflection of why I — and I believe many other programmers — get into this, how unproductive it can be, and how to snap out of it.
Why do we get obsessed about the exactly right keyboard setup, color schemes, fonts, task management…
Angular is an onion with the following layers:
Layer 1 is the most technically challenging, but, at the same time, you only need one good implementation of this stuff, and it will work reasonably well for most applications. This layer is also really well-defined. You can even benchmark your implementation to see how good it is. …
Nrwlio co-founder, Xoogler, Xangular. Work on dev tools for TS/JS. @NxDevTools and Nx Cloud architect. Calligraphy and philosophy enthusiast. Stoic.