Skip to content

Commit 9780874

Browse files
committed
docs(misc): update description field for SEO
1 parent 7eb0b77 commit 9780874

29 files changed

+161
-23
lines changed

docs/shared/concepts/buildable-and-publishable-libraries.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Publishable and Buildable Nx Libraries
3+
description: Learn about buildable and publishable libraries in Nx, when to use them, and how they adjust your project configuration for distribution.
4+
---
5+
16
# Publishable and Buildable Nx Libraries
27

38
The `--buildable` and `--publishable` options are available on the Nx library generators for the following plugins:
@@ -13,23 +18,23 @@ This document will look to explain the motivations for why you would use either
1318

1419
You might use the `--publishable` option when generating a new Nx library if your intention is to distribute it outside the monorepo.
1520

16-
One typical scenario for this may be that you use Nx to develop your organizations UI design system component library (maybe using its Storybook integration), which should be available also to your organizations apps that are not hosted within the same monorepo.
21+
One typical scenario for this may be that you use Nx to develop your organizations UI design system component library (maybe using its Storybook integration), which should be available also to your organizations' apps that are not hosted within the same monorepo.
1722

18-
A normal Nx library - lets call it "workspace library" - is not made for building or publishing. Rather it only includes common lint and test targets in its `project.json` file. These libraries are directly referenced from one of the monorepos applications and built together with them.
23+
A normal Nx library - let's call it "workspace library" - is not made for building or publishing. Rather it only includes common lint and test targets in its `project.json` file. These libraries are directly referenced from one of the monorepo's applications and built together with them.
1924

2025
Keep in mind that the `--publishable` flag does not enable automatic publishing. Rather it adds to your Nx workspace library a builder target that **compiles** and **bundles** your app. The resulting artifact will be ready to be published to some registry (e.g. [npm](https://npmjs.com/)). By having that builder, you can invoke the build via a command like: `nx build mylib` (where "mylib" is the name of the lib) which will then produce an optimized bundle in the `dist/mylib` folder.
2126

2227
One particularity when generating a library with `--publishable` is that it requires you to also provide an `--importPath`. Your import path is the actual scope of your distributable package (e.g.: `@myorg/mylib`) - which needs to be a [valid npm package name](https://docs.npmjs.com/files/package.json#name).
2328

24-
To publish the library (for example to npm) you can run the CLI command: `npm publish` from the artifact located in the `dist` directory. Setting up some automated script in Nxs `tools` folder may also come in handy.
29+
To publish the library (for example to npm) you can run the CLI command: `npm publish` from the artifact located in the `dist` directory. Setting up some automated script in Nx's `tools` folder may also come in handy.
2530

2631
For more details on the mechanics, remember that Nx is an open source project, so you can see the actual impact of the generator by looking at the source code (the best starting point is probably `packages/<framework>/src/generators/library/library.ts`).
2732

2833
## Buildable libraries
2934

3035
Buildable libraries are similar to "publishable libraries" described above. Their scope however is not to distribute or publish them to some external registry. Thus they might not be optimized for bundling and distribution.
3136

32-
Buildable libraries are mostly used for producing some pre-compiled output that can be directly referenced from an Nx workspace application without the need to again compile it. A typical scenario is to leverage Nxs incremental building capabilities.
37+
Buildable libraries are mostly used for producing some pre-compiled output that can be directly referenced from an Nx workspace application without the need to again compile it. A typical scenario is to leverage Nx's incremental building capabilities.
3338

3439
{% callout type="warning" title="More details" %}
3540
In order for a buildable library to be pre-compiled, it can only depend on other buildable libraries. This allows you to take full advantage of incremental builds.

docs/shared/concepts/common-tasks.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
title: Common Tasks
3+
description: Learn about standard task naming conventions in Nx projects, including build, serve, test, and lint tasks, for consistent project configuration.
24
keywords: [build, serve, test, lint]
35
---
46

docs/shared/concepts/daemon.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Nx Daemon
3+
description: Learn about the Nx Daemon, a background process that speeds up project graph computation in large workspaces by maintaining state between commands.
4+
---
5+
16
# Nx Daemon
27

38
In version 13 we introduced the opt-in Nx Daemon which Nx can leverage to dramatically speed up project graph computation, particularly for large workspaces.

docs/shared/concepts/decisions/code-ownership.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Code Ownership
3+
description: Learn about code ownership challenges in monorepos and how Nx helps manage shared code with tools like CODEOWNERS and module boundary rules.
4+
---
5+
16
# Code Ownership
27

38
One of the most obvious benefits of having a monorepo is that you can easily share code across projects. This enables you to apply the Don't Repeat Yourself principle across the whole codebase. Code sharing could mean using a function or a component in multiple projects. Or code sharing could mean using a typescript interface to define the network API interface for both the front end and back end applications.

docs/shared/concepts/decisions/dependency-management.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Dependency Management Strategies
3+
description: Compare independently maintained dependencies versus single version policy approaches for monorepos, with guidance on choosing the right strategy for your team.
4+
---
5+
16
# Dependency Management Strategies
27

38
When working with a monorepo, one of the key architectural decisions is how to manage dependencies across your projects. This document outlines two main strategies and helps you choose the right approach for your team.

docs/shared/concepts/decisions/folder-structure.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Folder Structure
3+
description: Learn about organizing your Nx monorepo with effective folder structures, and how to easily move or remove projects as your organization evolves.
4+
---
5+
16
# Folder Structure
27

38
Nx can work with any folder structure you choose, but it is good to have a plan in place for the folder structure of your monorepo.
@@ -51,7 +56,7 @@ libs/
5156

5257
One of the main advantages of using a monorepo is that there is more visibility into code that can be reused across many different applications. Shared projects are a great way to save developers time and effort by reusing a solution to a common problem.
5358

54-
Lets consider our reference monorepo. The `shared-data-access` project contains the code needed to communicate with the back-end (for example, the URL prefix). We know that this would be the same for all libs; therefore, we should place this in the shared lib and properly document it so that all projects can use it instead of writing their own versions.
59+
Let's consider our reference monorepo. The `shared-data-access` project contains the code needed to communicate with the back-end (for example, the URL prefix). We know that this would be the same for all libs; therefore, we should place this in the shared lib and properly document it so that all projects can use it instead of writing their own versions.
5560

5661
```text
5762
libs/

docs/shared/concepts/decisions/monorepo-polyrepo.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Monorepo or Polyrepo
3+
description: Evaluate the organizational considerations for choosing between monorepo and polyrepo approaches, including team agreements on code management and workflows.
4+
---
5+
16
# Monorepo or Polyrepo
27

38
Monorepos have a lot of benefits, but there are also some costs involved. We feel strongly that the [technical challenges](/concepts/decisions/why-monorepos) involved in maintaining large monorepos are fully addressed through the efficient use of Nx and Nx Cloud. Rather, the limiting factors in how large your monorepo grows are interpersonal.

docs/shared/concepts/decisions/monorepos.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Monorepos
3+
description: Understand the benefits of monorepos including shared code, atomic changes, developer mobility, and consistent dependencies across your organization.
4+
---
5+
16
# Monorepos
27

38
A monorepo is a single git repository that holds the source code for multiple applications and libraries, along with the tooling for them.
@@ -8,7 +13,7 @@ A monorepo is a single git repository that holds the source code for multiple ap
813

914
- **Atomic changes** - Change a server API and modify the downstream applications that consume that API in the same commit. You can change a button component in a shared library and the applications that use that component in the same commit. A monorepo saves the pain of trying to coordinate commits across multiple repositories.
1015

11-
- **Developer mobility** - Get a consistent way of building and testing applications written using different tools and technologies. Developers can confidently contribute to other teams applications and verify that their changes are safe.
16+
- **Developer mobility** - Get a consistent way of building and testing applications written using different tools and technologies. Developers can confidently contribute to other teams' applications and verify that their changes are safe.
1217

1318
- **Single set of dependencies** - [Use a single version of all third-party dependencies](/concepts/decisions/dependency-management), reducing inconsistencies between applications. Less actively developed applications are still kept up-to-date with the latest version of a framework, library, or build tool.
1419

@@ -34,7 +39,7 @@ Nx provides tools to give you the benefits of a monorepo without the drawbacks o
3439

3540
- **Consistent Code Generation** - Generators allow you to customize and standardize organizational conventions and structure, removing the need to perform the same manual setup tasks repetitively.
3641

37-
- **Affected Commands** - [Nxs affected commands](/nx-api/nx/documents/affected) analyze your source code, the context of the changes, and only runs tasks on the affected projects impacted by the source code changes.
42+
- **Affected Commands** - [Nx's affected commands](/nx-api/nx/documents/affected) analyze your source code, the context of the changes, and only runs tasks on the affected projects impacted by the source code changes.
3843

3944
- **Remote Caching** - Nx provides local caching and support for remote caching of command executions. With remote caching, when someone on your team runs a command, everyone else gets access to those artifacts to speed up their command executions, bringing them down from minutes to seconds. Nx helps you scale your development to massive applications and libraries even more with distributed task execution and incremental builds.
4045

docs/shared/concepts/decisions/project-dependency-rules.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Project Dependency Rules
3+
description: Learn how to organize your Nx workspace with library types like feature, UI, data-access, and utility libraries, and enforce dependency rules between them.
4+
---
5+
16
# Project Dependency Rules
27

38
There are many types of libraries in a workspace. You can identify the type of a library through a naming convention and/or by using the project tagging system. With explicitly defined types, you can also use Nx to enforce project dependency rules based on the types of each project. This article explains one possible way to organize your repository projects by type. Every repository is different and yours may need a different set of types.

docs/shared/concepts/decisions/project-size.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Project Size
3+
description: Understand the trade-offs of project granularity in Nx, including benefits like faster commands, clearer boundaries, and improved developer experience.
4+
---
5+
16
# Project Size
27

38
Like a lot of decisions in programming, deciding to make a new Nx project or not is all about trade-offs. Each organization will decide on their own conventions, but here are some trade-offs to bear in mind as you have the conversation.

docs/shared/concepts/executors-and-configurations.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Executors and Configurations
3+
description: Learn about Nx executors, pre-packaged node scripts that run tasks consistently across projects, and how to configure them in project.json files.
4+
---
5+
16
# Executors and Configurations
27

38
Executors are pre-packaged node scripts that can be used to run tasks in a consistent way.

docs/shared/concepts/how-caching-works.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: How Caching Works
3+
description: Learn how Nx's computation hashing enables powerful caching, including what factors determine cache validity and how local and remote caches work together.
4+
---
5+
16
# How Caching Works
27

38
Before running any cacheable task, Nx computes its computation hash. As long as the computation hash is the same, the output of
@@ -18,11 +23,11 @@ By default, the computation hash for something like `nx test remixapp` includes:
1823
1924
After Nx computes the hash for a task, it then checks if it ran this exact computation before. First, it checks locally, and then if it is missing, and if a remote cache is configured, it checks remotely. If a matching computation is found, Nx retrieves and replays it. This includes restoring files.
2025

21-
Nx places the right files in the right folders and prints the terminal output. From the users point of view, the command ran the same, just a lot faster.
26+
Nx places the right files in the right folders and prints the terminal output. From the user's point of view, the command ran the same, just a lot faster.
2227

2328
![cache](/shared/images/caching/cache.svg)
2429

25-
If Nx doesnt find a corresponding computation hash, Nx runs the task, and after it completes, it takes the outputs and the terminal logs and stores them locally (and, if configured, remotely as well). All of this happens transparently, so you dont have to worry about it.
30+
If Nx doesn't find a corresponding computation hash, Nx runs the task, and after it completes, it takes the outputs and the terminal logs and stores them locally (and, if configured, remotely as well). All of this happens transparently, so you don't have to worry about it.
2631

2732
## Optimizations
2833

@@ -96,8 +101,7 @@ Nx cache works on the process level. Regardless of the tools used to build/test/
96101

97102
{% /tab %}
98103

99-
If the `outputs` property for a given target isn't defined in the project'
100-
s `package.json` file, Nx will look at the global, workspace-wide definition in the `targetDefaults` section of `nx.json`:
104+
If the `outputs` property for a given target isn't defined in the project's `package.json` file, Nx will look at the global, workspace-wide definition in the `targetDefaults` section of `nx.json`:
101105

102106
```jsonc {% fileName="nx.json"%}
103107
{

docs/shared/concepts/inferred-tasks.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Inferred Tasks (Project Crystal)
3+
description: Learn how Nx plugins automatically infer tasks from tool configurations, enabling caching, task dependencies, and optimized execution without manual setup.
4+
---
5+
16
# Inferred Tasks (Project Crystal)
27

38
In Nx version 18, Nx plugins can automatically infer tasks for your projects based on the configuration of different tools. Many tools have configuration files which determine what a tool does. Nx is able to cache the results of running the tool. Nx plugins use the same configuration files to infer how Nx should [run the task](/features/run-tasks). This includes [fine-tuned cache settings](/features/cache-task-results) and automatic [task dependencies](/concepts/task-pipeline-configuration).

docs/shared/concepts/mental-model.md

+15-10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Mental Model
3+
description: Understand how Nx works with project graphs, task graphs, affected commands, and caching to efficiently manage your monorepo development workflow.
4+
---
5+
16
# Mental Model
27

38
Nx is a VSCode of build tools, with a powerful core, driven by metadata, and extensible through [plugins](/concepts/nx-plugins). Nx works with a
@@ -6,13 +11,13 @@ with project graphs, task graphs, affected commands, computation hashing and cac
611

712
## The project graph
813

9-
A project graph is used to reflect the source code in your repository and all the external dependencies that arent
14+
A project graph is used to reflect the source code in your repository and all the external dependencies that aren't
1015
authored in your repository, such as Webpack, React, Angular, and so forth.
1116

1217
![project-graph](/shared/mental-model/project-graph.svg)
1318

1419
Nx analyzes your file system to detect projects. Projects are identified by the presence of a `package.json` file or `project.json` file. Projects identification can also be customized through plugins. You can manually define dependencies between
15-
the project nodes, but you dont have to do it very often. Nx analyzes files source code, your installed dependencies, TypeScript
20+
the project nodes, but you don't have to do it very often. Nx analyzes files' source code, your installed dependencies, TypeScript
1621
files, and others figuring out these dependencies for you. Nx also stores the cached project graph, so it only
1722
reanalyzes the files you have changed.
1823

@@ -43,8 +48,8 @@ For instance `nx test lib` creates a task graph with a single node:
4348

4449
A task is an invocation of a target. If you invoke the same target twice, you create two tasks.
4550

46-
Nx uses the [project graph](#the-project-graph), but the task graph and project graph arent isomorphic, meaning they
47-
arent directly connected. In the case above, `app1` and `app2` depend on `lib`, but
51+
Nx uses the [project graph](#the-project-graph), but the task graph and project graph aren't isomorphic, meaning they
52+
aren't directly connected. In the case above, `app1` and `app2` depend on `lib`, but
4853
running `nx run-many -t test -p app1 app2 lib`, the created task graph will look like this:
4954
{% side-by-side %}
5055

@@ -62,11 +67,11 @@ running `nx run-many -t test -p app1 app2 lib`, the created task graph will look
6267
{% /graph %}
6368
{% /side-by-side %}
6469

65-
Even though the apps depend on `lib`, testing `app1` doesnt depend on the testing `lib`. This means that the two tasks
70+
Even though the apps depend on `lib`, testing `app1` doesn't depend on the testing `lib`. This means that the two tasks
6671
can
6772
run in parallel.
6873

69-
Lets look at the test target relying on its dependencies.
74+
Let's look at the test target relying on its dependencies.
7075

7176
```json
7277
{
@@ -161,12 +166,12 @@ After Nx computes the hash for a task, it then checks if it ran this exact compu
161166
and then if it is missing, and if a remote cache is configured, it checks remotely.
162167

163168
If Nx finds the computation, Nx retrieves it and replay it. Nx places the right files in the right folders and prints
164-
the terminal output. So from the users point of view, the command ran the same, just a lot faster.
169+
the terminal output. So from the user's point of view, the command ran the same, just a lot faster.
165170

166171
![cache](/shared/mental-model/cache.svg)
167172

168-
If Nx doesnt find this computation, Nx runs the task, and after it completes, it takes the outputs and the terminal
169-
output and stores it locally (and if configured remotely). All of this happens transparently, so you dont have to worry
173+
If Nx doesn't find this computation, Nx runs the task, and after it completes, it takes the outputs and the terminal
174+
output and stores it locally (and if configured remotely). All of this happens transparently, so you don't have to worry
170175
about it.
171176

172177
Although conceptually this is fairly straightforward, Nx optimizes this to make this experience good for you. For
@@ -209,7 +214,7 @@ it locally.
209214
## In summary
210215

211216
- Nx is able to analyze your source code to create a Project Graph.
212-
- Nx can use the project graph and information about projects targets to create a Task Graph.
217+
- Nx can use the project graph and information about projects' targets to create a Task Graph.
213218
- Nx is able to perform code-change analysis to create the smallest task graph for your PR.
214219
- Nx supports computation caching to never execute the same computation twice. This computation cache is pluggable and
215220
can be distributed.

docs/shared/concepts/module-federation/faster-builds.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Faster Builds with Module Federation
3+
description: Learn how Module Federation in Nx enables faster builds by splitting large SPAs into smaller remote applications while minimizing common downsides.
4+
---
5+
16
# Faster Builds with Module Federation
27

38
As applications grow, builds can become unacceptably slow, which leads to slow CI/CD pipelines and long dev-server

0 commit comments

Comments
 (0)