Skip to content

Commit

Permalink
fix(nx-dev): fix project details in nx dev (#23175)
Browse files Browse the repository at this point in the history
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
fix project details in nx dev
add metadata to nx dev's project details json

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
  • Loading branch information
xiongemi committed May 4, 2024
1 parent 30446df commit fd5ea92
Show file tree
Hide file tree
Showing 18 changed files with 195 additions and 170 deletions.
32 changes: 28 additions & 4 deletions docs/nx-cloud/features/split-e2e-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ nx show project myproject-e2e --web
"project": {
"name": "admin-e2e",
"data": {
"metadata": {
"targetGroups": {
"E2E (CI)": [
"e2e-ci--src/e2e/app.cy.ts",
"e2e-ci--src/e2e/login.cy.ts",
"e2e-ci"
]
}
},
"root": "apps/admin-e2e",
"projectType": "application",
"targets": {
Expand All @@ -82,6 +91,9 @@ nx show project myproject-e2e --web
"production": {
"command": "cypress run --env webServerCommand=\"nx run admin:preview\""
}
},
"metadata": {
"technologies": ["cypress"]
}
},
"e2e-ci--src/e2e/app.cy.ts": {
Expand All @@ -102,7 +114,10 @@ nx show project myproject-e2e --web
"command": "cypress run --env webServerCommand=\"nx run admin:serve-static\" --spec src/e2e/app.cy.ts"
},
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["cypress"]
}
},
"e2e-ci--src/e2e/login.cy.ts": {
"outputs": [
Expand All @@ -122,7 +137,10 @@ nx show project myproject-e2e --web
"command": "cypress run --env webServerCommand=\"nx run admin:serve-static\" --spec src/e2e/login.cy.ts"
},
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["cypress"]
}
},
"e2e-ci": {
"executor": "nx:noop",
Expand Down Expand Up @@ -151,15 +169,21 @@ nx show project myproject-e2e --web
}
],
"options": {},
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["cypress"]
}
},
"lint": {
"executor": "@nx/eslint:lint",
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
"cache": true,
"outputs": ["{options.outputFile}"],
"options": {},
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["eslint"]
}
}
},
"name": "admin-e2e",
Expand Down
25 changes: 21 additions & 4 deletions docs/shared/angular-standalone-tutorial/angular-standalone.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ nx show project e2e --web
"name": "e2e",
"type": "e2e",
"data": {
"metadata": {
"targetGroups": {
"E2E (CI)": ["e2e-ci--src/e2e/app.cy.ts", "e2e-ci"]
}
},
"name": "e2e",
"root": "e2e",
"sourceRoot": "e2e/src",
Expand Down Expand Up @@ -247,7 +252,10 @@ nx show project e2e --web
"command": "cypress run --env webServerCommand=\"nx run myngapp:serve:production\""
}
},
"executor": "nx:run-commands"
"executor": "nx:run-commands",
"metadata": {
"technologies": ["cypress"]
}
},
"e2e-ci--src/e2e/app.cy.ts": {
"outputs": [
Expand All @@ -267,7 +275,10 @@ nx show project e2e --web
"command": "cypress run --env webServerCommand=\"nx run myngapp:serve-static\" --spec src/e2e/app.cy.ts"
},
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["cypress"]
}
},
"e2e-ci": {
"executor": "nx:noop",
Expand All @@ -291,7 +302,10 @@ nx show project e2e --web
}
],
"options": {},
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["cypress"]
}
},
"lint": {
"cache": true,
Expand All @@ -309,7 +323,10 @@ nx show project e2e --web
}
],
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["eslint"]
}
}
}
}
Expand Down
25 changes: 21 additions & 4 deletions docs/shared/angular-tutorial/angular-monorepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,11 @@ nx show project angular-store-e2e --web
"name": "angular-store-e2e",
"type": "e2e",
"data": {
"metadata": {
"targetGroups": {
"E2E (CI)": ["e2e-ci--src/e2e/app.cy.ts", "e2e-ci"]
}
},
"name": "angular-store-e2e",
"root": "apps/angular-store-e2e",
"sourceRoot": "apps/angular-store-e2e/src",
Expand Down Expand Up @@ -664,7 +669,10 @@ nx show project angular-store-e2e --web
"command": "cypress run --env webServerCommand=\"nx run angular-store:serve:production\""
}
},
"executor": "nx:run-commands"
"executor": "nx:run-commands",
"metadata": {
"technologies": ["cypress"]
}
},
"e2e-ci--src/e2e/app.cy.ts": {
"outputs": [
Expand All @@ -684,7 +692,10 @@ nx show project angular-store-e2e --web
"command": "cypress run --env webServerCommand=\"nx run angular-store:serve-static\" --spec src/e2e/app.cy.ts"
},
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["cypress"]
}
},
"e2e-ci": {
"executor": "nx:noop",
Expand All @@ -708,7 +719,10 @@ nx show project angular-store-e2e --web
}
],
"options": {},
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["cypress"]
}
},
"lint": {
"cache": true,
Expand All @@ -726,7 +740,10 @@ nx show project angular-store-e2e --web
}
],
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["eslint"]
}
}
}
}
Expand Down
30 changes: 24 additions & 6 deletions docs/shared/concepts/myreactapp.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,32 @@
],
"outputs": ["{workspaceRoot}/dist/apps/myreactapp"],
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["vite"]
}
},
"serve": {
"options": {
"cwd": "apps/myreactapp",
"command": "vite serve"
},
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["vite"]
}
},
"preview": {
"options": {
"cwd": "apps/myreactapp",
"command": "vite preview"
},
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["vite"]
}
},
"serve-static": {
"executor": "@nx/web:file-server",
Expand All @@ -61,7 +70,10 @@
],
"outputs": ["{workspaceRoot}/coverage/apps/myreactapp"],
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["vite"]
}
},
"lint": {
"cache": true,
Expand All @@ -79,15 +91,21 @@
}
],
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["eslint"]
}
}
},
"name": "myreactapp",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/myreactapp/src",
"projectType": "application",
"tags": [],
"implicitDependencies": []
"implicitDependencies": [],
"metadata": {
"technologies": ["react"]
}
}
},
"sourceMap": {
Expand Down
20 changes: 16 additions & 4 deletions docs/shared/migration/adding-to-existing-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ nx show project my-workspace --web
}
],
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["eslint"]
}
},
"next:build": {
"options": {
Expand All @@ -151,15 +154,21 @@ nx show project my-workspace --web
],
"outputs": ["{projectRoot}/.next", "{projectRoot}/.next/!(cache)"],
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["next"]
}
},
"dev": {
"options": {
"cwd": ".",
"command": "next dev"
},
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["next"]
}
},
"start": {
"options": {
Expand All @@ -168,7 +177,10 @@ nx show project my-workspace --web
},
"dependsOn": ["build"],
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["next"]
}
}
},
"sourceRoot": ".",
Expand Down
20 changes: 16 additions & 4 deletions docs/shared/migration/adding-to-monorepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ nx show project my-workspace --web
}
],
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["eslint"]
}
},
"next:build": {
"options": {
Expand All @@ -154,15 +157,21 @@ nx show project my-workspace --web
],
"outputs": ["{projectRoot}/.next", "{projectRoot}/.next/!(cache)"],
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["next"]
}
},
"dev": {
"options": {
"cwd": ".",
"command": "next dev"
},
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["next"]
}
},
"start": {
"options": {
Expand All @@ -171,7 +180,10 @@ nx show project my-workspace --web
},
"dependsOn": ["build"],
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["next"]
}
}
},
"sourceRoot": ".",
Expand Down
8 changes: 7 additions & 1 deletion docs/shared/react-standalone-tutorial/react-standalone.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ nx show project myreactapp --web
"project": {
"name": "myreactapp",
"data": {
"metadata": {
"technologies": ["react"]
},
"root": ".",
"includedScripts": [],
"name": "myreactapp",
Expand All @@ -149,7 +152,10 @@ nx show project myreactapp --web
],
"outputs": ["{projectRoot}/dist/myreactapp"],
"executor": "nx:run-commands",
"configurations": {}
"configurations": {},
"metadata": {
"technologies": ["vite"]
}
}
},
"sourceRoot": "./src",
Expand Down

0 comments on commit fd5ea92

Please sign in to comment.