This PR removes the `/nx-api` pages from `nx-dev`. They are already redirected from `/nx-api` to either `/technologies` or `/reference/core-api` URLs. e.g. `/nx-api/nx` goes to `/reference/core-api/nx` and `/nx-api/react` goes to `/technologies/react/api` **Changes**: - Remove old `nx-api.json` from being generated in `scripts/documentation/generators/generate-manifests.ts` -- this was used to generate the sitemap - Remove `pages/nx-api` from Next.js app since we don't need them - Remove workaround from link checker `scripts/documentation/internal-link-checker.ts` -- the angular rspack/rsbuild and other workarounds are gone now that they are proper docs in `map.json` - Update Powerpack/Remote Cache reference docs to exclude API documents (since they are duplicated in the Intro page) -- `nx-dev/models-document/src/lib/mappings.ts` - All content in `docs` have been updated with new URL structure **Note:** Redirects are already handled, and Claude Code was used to verify the updated `docs/` URLs (see report below). The twelve 404s links were updated by hand. ## Verification Report https://gist.github.com/jaysoo/c7863fe7e091cb77929d1976165c357a
42 lines
1.4 KiB
Markdown
42 lines
1.4 KiB
Markdown
---
|
|
title: 'workspace.json'
|
|
description: 'Learn about the deprecation of workspace.json in Nx and how to migrate to project.json files for better project configuration management.'
|
|
---
|
|
|
|
# workspace.json
|
|
|
|
Nx used to have a `workspace.json` file at the root of the repo that at various points performed these functions:
|
|
|
|
1. Identified the locations of all project in the repo
|
|
2. Contained the target configuration for all projects
|
|
|
|
Identifying the locations of projects is now done automatically through project inference. You can even customize how projects are inferred with a [project inference plugin](/extending-nx/recipes/project-graph-plugins).
|
|
|
|
The target configuration for each project is now stored in individual `project.json` files or `package.json` files.
|
|
|
|
## Removing workspace.json
|
|
|
|
To remove `workspace.json` in favor of `project.json` files, run:
|
|
|
|
```shell
|
|
nx g @nx/workspace:fix-configuration
|
|
```
|
|
|
|
See [fix-configuration](/reference/core-api/workspace/generators/fix-configuration) for more options.
|
|
|
|
After this command, `workspace.json` should look like this:
|
|
|
|
```jsonc
|
|
{
|
|
"version": 2,
|
|
"projects": {
|
|
"my-app": "apps/my-app",
|
|
"some-lib": "libs/some-lib"
|
|
// ...
|
|
},
|
|
"$schema": "./node_modules/nx/schemas/workspace-schema.json"
|
|
}
|
|
```
|
|
|
|
If every project is listed as a string, instead of an object with project configuration properties, then it is safe to delete the `workspace.json` file.
|