Pages

Monday, 11 November 2024

nx

 npm install -g nx@latest

------------------------------------

Installing Nx Globally

You can install Nx globally. Depending on your package manager, use one of the following commands:

npm add --global nx@latest

The advantage of a global installation is that you don't have to prefix your commands with npx, yarn or pnpm. The global Nx installation hands off the process execution to the local Nx installation in your repository, which eliminates any issues with outdated globally installed packages.

Install Nx in a Non-Javascript Repo

Nx can manage its own installation without requiring a package.json file or a node_modules folder. This type of installation is useful for repositories that may not contain any JavaScript or TypeScript (e.g. .Net or Java based workspaces that want to leverage Nx features). In this setup, the Nx CLI is all contained within a .nx folder. To set this up run the nx init command in a folder without a package.json file.


npx nx init

See the install Nx in a non-javascript repo recipe for more information.

Update Nx

When you update Nx, Nx will also automatically update your dependencies if you have an Nx plugin installed for that dependency. To update Nx, run:

npx nx migrate latest

This will create a migrations.json file with any update scripts that need to be run. Run them with:

npx nx migrate --run-migrations

Update One Major Version at a Time

Tutorials.  

Try one of these tutorials for a full walkthrough of what to do after you install Nx

More Documentation

from https://nx.dev/getting-started/installation 

-------------------------

Smart Monorepos · Fast CI

nx.dev 

Smart Monorepos · Fast CI

Nx is a build system, optimized for monorepos, with plugins for popular frameworks and tools and advanced CI capabilities including caching and distribution.

Create a new Nx workspace with

npx create-nx-workspace

...or run

npx nx init

to add Nx to your existing workspace to get faster task scheduling, caching and more. More in the docs.

Learn about CI with Nx Cloud

Nx Cloud connects directly to your existing CI setup, helping you scale your monorepos on CI by leveraging remote caching, task distribution across multiple machines, automated e2e test splitting and automated task flakiness detection

Connect your existing Nx workspace with

npx nx connect

Learn more in the Nx CI docs »

Useful links

from https://github.com/nrwl/nx

 

 

 


No comments:

Post a Comment