Biggest advantage og nrwl/nx
was implementing multiple workspaces in one project.
Now angular 6
supperts it as well.
What are other adventages of nx
over angular@6 ?
Nx plugins helps you develop Angular applications with fully integrated support for modern tools and libraries like Jest, Cypress, ESLint, Storybook, NgRx and more.
Nx analyzes your workspace to improve performance and developer experience. Nx distributes any command across multiple machines without any configuration. Nx never rebuilds or tests the same code twice. Nx simplifies extracting and refactoring shared libraries.
Nx Workspace is a tool suite designed to architect, build and manage monorepos at any scale. It has out-of-the-box support for multiple frontend frameworks like Angular and React as well as backend technologies including Nest, Next, and Express.
Nx is a general-purpose build system and a general-purpose CLI. It works with JavaScript, TypeScript, Java, C#, Go, etc.. The core plugins Nx comes with do work best with JavaScript or TypeScript. You can build/test/lint/serve your applications and libraries the same way whether you use JavaScript and TypeScript.
Angular CLI 1.x wasn’t a great fit for Nx. We talked to the Angular CLI team, and they shared the design docs for what became Angular CLI 6. It was clear that most of what we needed to make Nx excellent would be available in future versions of the Angular CLI. So we decided to invest the effort to make Nrwl Nx an extension to Angular CLI 1.x.
Nx also supports optional free cloud support with Nx Cloud, as well as GitHub integration. Regardless of how you use Nx (with Angular CLI or standalone), you can always use the Angular Devkit. You can generate code using schematics and invoke builders. But there is an alternative: you can use Nx Devkit.
If you add Nx to an Angular CLI project, ng and nx are interchangeable (they invoke the same command). So anywhere you see "nx build" or "nx affected", you can also use "ng build" or "ng affected". Nx integrates well with the Angular CLI: It decorates the Angular CLI.
“Modern Angular” also means working together with other frameworks. Most large companies use multiple frameworks to build their applications. One org can use Angular, another one can use React, and this is OK. Nx provides the same dev experience for many frameworks including Angular and React.
nx is amazing, i'm using it because we have 5 angular applications in a big project,and i think that nrwl/nx is made for complex enterprise applications, so if you have a big project composed of many frontend applications it will be useful, but even for a single app that will give you many advantages, here is some benefits of nx :
with one command you can build or test apps affected by your changes
yarn affected:build --all --prod
yarn affected:test --all --prod
Now it's possible to generate many types of frontend applications ANGULAR, REACT // for generateing a react app ng add @nrwl/react # Add React capabilities to your workspace ng g @nrwl/react:application reactAppName
// for generating an angular app
ng add @nrwl/angular
ng g @nrwl/angular:application angularAppName
Generate backend applications for your frontend app like Nest and create shared libs between frontend and backend apps in a flexible way
ng add @nrwl/nest
ng g @nrwl/nest:app api --frontendProject=YOU_FRONTEND_PROJECT // link the generate nest app to a specific frontend app
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With