docs(misc): add missing initial package.json content to monorepo migration recipe (#22541)

This commit is contained in:
Leosvel Pérez Espinosa 2024-04-02 17:08:10 +02:00 committed by GitHub
parent afc324d3f9
commit 910491d4ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,7 +50,22 @@ This will set up Nx for you - updating the `package.json` file and creating a ne
} }
``` ```
When Nx updates your `package.json` scripts, it looks for scripts that can be replaced with an Nx command that has caching automatically enabled. The `package.json` defined above would be updated to look like this: When Nx updates your `package.json` scripts, it looks for scripts that can be replaced with an Nx command that has caching automatically enabled. Assuming you initially had a `package.json` file looking like the following:
```json {% fileName="package.json" %}
{
"name": "my-workspace",
...
"scripts": {
"build": "next build",
"lint": "eslint ./src",
"test": "node ./run-tests.js"
},
...
}
```
After setting up Nx, the `package.json` file would be updated to look like this:
```json {% fileName="package.json" %} ```json {% fileName="package.json" %}
{ {