cleanup(misc): remove add-nx-to-monorepo package (#15498)
This commit is contained in:
parent
cdc0906132
commit
e5b48ac956
7
.github/workflows/e2e-matrix.yml
vendored
7
.github/workflows/e2e-matrix.yml
vendored
@ -102,7 +102,6 @@ jobs:
|
|||||||
- yarn
|
- yarn
|
||||||
- pnpm
|
- pnpm
|
||||||
project:
|
project:
|
||||||
- e2e-add-nx-to-monorepo
|
|
||||||
- e2e-angular-core
|
- e2e-angular-core
|
||||||
- e2e-angular-extensions
|
- e2e-angular-extensions
|
||||||
- e2e-cra-to-nx
|
- e2e-cra-to-nx
|
||||||
@ -143,8 +142,6 @@ jobs:
|
|||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
os_timeout: 90
|
os_timeout: 90
|
||||||
# codeowner groups
|
# codeowner groups
|
||||||
- project: e2e-add-nx-to-monorepo
|
|
||||||
codeowners: 'S04SYHYKGNP'
|
|
||||||
- project: e2e-angular-core
|
- project: e2e-angular-core
|
||||||
codeowners: 'S04SS457V38'
|
codeowners: 'S04SS457V38'
|
||||||
- project: e2e-angular-extensions
|
- project: e2e-angular-extensions
|
||||||
@ -210,8 +207,6 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
project: e2e-expo
|
project: e2e-expo
|
||||||
# exclude non-CNW/Lerna tests from non-LTS node versions
|
# exclude non-CNW/Lerna tests from non-LTS node versions
|
||||||
- node_version: 16
|
|
||||||
project: e2e-add-nx-to-monorepo
|
|
||||||
- node_version: 16
|
- node_version: 16
|
||||||
project: e2e-angular-core
|
project: e2e-angular-core
|
||||||
- node_version: 16
|
- node_version: 16
|
||||||
@ -262,8 +257,6 @@ jobs:
|
|||||||
project: e2e-vite
|
project: e2e-vite
|
||||||
- node_version: 16
|
- node_version: 16
|
||||||
project: e2e-webpack
|
project: e2e-webpack
|
||||||
- node_version: 19
|
|
||||||
project: e2e-add-nx-to-monorepo
|
|
||||||
- node_version: 19
|
- node_version: 19
|
||||||
project: e2e-angular-core
|
project: e2e-angular-core
|
||||||
- node_version: 19
|
- node_version: 19
|
||||||
|
|||||||
7
.github/workflows/e2e-windows.yml
vendored
7
.github/workflows/e2e-windows.yml
vendored
@ -73,7 +73,6 @@ jobs:
|
|||||||
package_manager:
|
package_manager:
|
||||||
- npm
|
- npm
|
||||||
project:
|
project:
|
||||||
- e2e-add-nx-to-monorepo
|
|
||||||
- e2e-angular-core
|
- e2e-angular-core
|
||||||
- e2e-angular-extensions
|
- e2e-angular-extensions
|
||||||
- e2e-cra-to-nx
|
- e2e-cra-to-nx
|
||||||
@ -101,8 +100,6 @@ jobs:
|
|||||||
- e2e-workspace-create-npm
|
- e2e-workspace-create-npm
|
||||||
include:
|
include:
|
||||||
# codeowner groups
|
# codeowner groups
|
||||||
- project: e2e-add-nx-to-monorepo
|
|
||||||
codeowners: 'S04SYHYKGNP'
|
|
||||||
- project: e2e-angular-core
|
- project: e2e-angular-core
|
||||||
codeowners: 'S04SS457V38'
|
codeowners: 'S04SS457V38'
|
||||||
- project: e2e-angular-extensions
|
- project: e2e-angular-extensions
|
||||||
@ -155,8 +152,6 @@ jobs:
|
|||||||
codeowners: 'S04SYHYKGNP'
|
codeowners: 'S04SYHYKGNP'
|
||||||
exclude:
|
exclude:
|
||||||
# exclude non-CNW/Lerna tests from non-LTS node versions
|
# exclude non-CNW/Lerna tests from non-LTS node versions
|
||||||
- node_version: 16
|
|
||||||
project: e2e-add-nx-to-monorepo
|
|
||||||
- node_version: 16
|
- node_version: 16
|
||||||
project: e2e-angular-core
|
project: e2e-angular-core
|
||||||
- node_version: 16
|
- node_version: 16
|
||||||
@ -201,8 +196,6 @@ jobs:
|
|||||||
project: e2e-vite
|
project: e2e-vite
|
||||||
- node_version: 16
|
- node_version: 16
|
||||||
project: e2e-webpack
|
project: e2e-webpack
|
||||||
- node_version: 19
|
|
||||||
project: e2e-add-nx-to-monorepo
|
|
||||||
- node_version: 19
|
- node_version: 19
|
||||||
project: e2e-angular-core
|
project: e2e-angular-core
|
||||||
- node_version: 19
|
- node_version: 19
|
||||||
|
|||||||
@ -140,9 +140,6 @@ yarn.lock @FrozenPandaz @vsavkin @AgentEnder @jaysoo @JamesHenry
|
|||||||
/e2e/workspace-create/** @FrozenPandaz @AgentEnder @vsavkin
|
/e2e/workspace-create/** @FrozenPandaz @AgentEnder @vsavkin
|
||||||
/e2e/workspace-create-npm/** @FrozenPandaz @vsavkin
|
/e2e/workspace-create-npm/** @FrozenPandaz @vsavkin
|
||||||
|
|
||||||
/packages/add-nx-to-monorepo/** @vsavkin @FrozenPandaz @AgentEnder
|
|
||||||
/e2e/add-nx-to-monorepo/** @vsavkin @FrozenPandaz @AgentEnder
|
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
/e2e/lerna-smoke-tests/** @vsavkin @JamesHenry
|
/e2e/lerna-smoke-tests/** @vsavkin @JamesHenry
|
||||||
/e2e/utils/** @meeroslav @barbados-clemens @vsavkin @mandarini
|
/e2e/utils/** @meeroslav @barbados-clemens @vsavkin @mandarini
|
||||||
|
|||||||
@ -3754,14 +3754,6 @@
|
|||||||
{
|
{
|
||||||
"id": "packages",
|
"id": "packages",
|
||||||
"menu": [
|
"menu": [
|
||||||
{
|
|
||||||
"id": "add-nx-to-monorepo",
|
|
||||||
"path": "/packages/add-nx-to-monorepo",
|
|
||||||
"name": "add-nx-to-monorepo",
|
|
||||||
"children": [],
|
|
||||||
"isExternal": false,
|
|
||||||
"disableCollapsible": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": "angular",
|
"id": "angular",
|
||||||
"path": "/packages/angular",
|
"path": "/packages/angular",
|
||||||
|
|||||||
@ -1,16 +1,4 @@
|
|||||||
{
|
{
|
||||||
"add-nx-to-monorepo": {
|
|
||||||
"githubRoot": "https://github.com/nrwl/nx/blob/master",
|
|
||||||
"name": "add-nx-to-monorepo",
|
|
||||||
"packageName": "add-nx-to-monorepo",
|
|
||||||
"description": "Make any monorepo faster by adding Nx to it",
|
|
||||||
"documents": {},
|
|
||||||
"root": "/packages/add-nx-to-monorepo",
|
|
||||||
"source": "/packages/add-nx-to-monorepo/src",
|
|
||||||
"executors": {},
|
|
||||||
"generators": {},
|
|
||||||
"path": "/packages/add-nx-to-monorepo"
|
|
||||||
},
|
|
||||||
"angular": {
|
"angular": {
|
||||||
"githubRoot": "https://github.com/nrwl/nx/blob/master",
|
"githubRoot": "https://github.com/nrwl/nx/blob/master",
|
||||||
"name": "angular",
|
"name": "angular",
|
||||||
|
|||||||
@ -1,15 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"description": "Make any monorepo faster by adding Nx to it",
|
|
||||||
"documents": [],
|
|
||||||
"executors": [],
|
|
||||||
"generators": [],
|
|
||||||
"githubRoot": "https://github.com/nrwl/nx/blob/master",
|
|
||||||
"name": "add-nx-to-monorepo",
|
|
||||||
"packageName": "add-nx-to-monorepo",
|
|
||||||
"root": "/packages/add-nx-to-monorepo",
|
|
||||||
"source": "/packages/add-nx-to-monorepo/src"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Upgrading AngularJS applications \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
|
"description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Upgrading AngularJS applications \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
|
||||||
"documents": [
|
"documents": [
|
||||||
|
|||||||
@ -1,11 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"name": "add-nx-to-monorepo",
|
|
||||||
"packageName": "add-nx-to-monorepo",
|
|
||||||
"description": "Make any monorepo faster by adding Nx to it",
|
|
||||||
"path": "generated/packages/add-nx-to-monorepo.json",
|
|
||||||
"schemas": { "executors": [], "generators": [] }
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "angular",
|
"name": "angular",
|
||||||
"packageName": "angular",
|
"packageName": "angular",
|
||||||
|
|||||||
@ -9,7 +9,7 @@ In this tutorial you:
|
|||||||
- Used Nx's affected commands to only rebuild affected projects
|
- Used Nx's affected commands to only rebuild affected projects
|
||||||
- Used Nx's ability to automatically detect dependencies between js/ts projects
|
- Used Nx's ability to automatically detect dependencies between js/ts projects
|
||||||
|
|
||||||
You created a workspace from scratch in this tutorial, but if you would like to add Nx to an existing repository, you can use the `npx add-nx-to-monorepo` terminal command to get started. For more information see the [Adding Nx to Lerna/Yarn/PNPM/NPM Workspace](migration/adding-to-monorepo) guide.
|
You created a workspace from scratch in this tutorial, but if you would like to add Nx to an existing repository, you can use the `npx nx@latest init` terminal command to get started. For more information see the [Adding Nx to Lerna/Yarn/PNPM/NPM Workspace](migration/adding-to-monorepo) guide.
|
||||||
|
|
||||||
## Learn more
|
## Learn more
|
||||||
|
|
||||||
|
|||||||
@ -809,135 +809,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "add-nx-to-monorepo",
|
|
||||||
"type": "lib",
|
|
||||||
"data": {
|
|
||||||
"tags": [],
|
|
||||||
"root": "packages/add-nx-to-monorepo",
|
|
||||||
"files": [
|
|
||||||
{
|
|
||||||
"file": "packages/add-nx-to-monorepo/.eslintrc.json",
|
|
||||||
"hash": "fea46111a20ae8689af46385367f70421bb9b054"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "packages/add-nx-to-monorepo/jest.config.ts",
|
|
||||||
"hash": "afbef505f1ec54cc514b99a9a17b28ae324fee9d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "packages/add-nx-to-monorepo/package.json",
|
|
||||||
"hash": "dd6e5957571f279d2d74f9b044a4625fb5effecb",
|
|
||||||
"deps": ["npm:enquirer", "npm:ignore", "nx", "npm:yargs-parser"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "packages/add-nx-to-monorepo/project.json",
|
|
||||||
"hash": "dc07d52c75ed78c70bb162b71fb616f9d4e43d99"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "packages/add-nx-to-monorepo/README.md",
|
|
||||||
"hash": "4c9ccc040cce4906abe2bbd902ceaf82750b4303"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "packages/add-nx-to-monorepo/src/add-nx-to-monorepo.ts",
|
|
||||||
"hash": "92676814246d70350360ac2012a3af4b70800ea7",
|
|
||||||
"deps": ["npm:enquirer", "nx", "npm:ignore", "npm:yargs-parser"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "packages/add-nx-to-monorepo/tsconfig.json",
|
|
||||||
"hash": "62ebbd946474cea997e774d20fffc4d585c184f3"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "packages/add-nx-to-monorepo/tsconfig.lib.json",
|
|
||||||
"hash": "ddf3333d32bff44ffcf392ccdc3f72993ef14663"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "packages/add-nx-to-monorepo/tsconfig.spec.json",
|
|
||||||
"hash": "831ab6481bfec07dac66b6f62828f76f898f0edf"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"targets": {
|
|
||||||
"lint": {
|
|
||||||
"executor": "@nrwl/linter:eslint",
|
|
||||||
"options": {
|
|
||||||
"lintFilePatterns": ["packages/add-nx-to-monorepo/**/*.ts"]
|
|
||||||
},
|
|
||||||
"inputs": [
|
|
||||||
"default",
|
|
||||||
"{workspaceRoot}/.eslintrc.json",
|
|
||||||
"{workspaceRoot}/tools/eslint-rules/**/*"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"test": {
|
|
||||||
"executor": "@nrwl/jest:jest",
|
|
||||||
"outputs": ["{workspaceRoot}/coverage/packages/add-nx-to-monorepo"],
|
|
||||||
"options": {
|
|
||||||
"jestConfig": "packages/add-nx-to-monorepo/jest.config.ts",
|
|
||||||
"passWithNoTests": true
|
|
||||||
},
|
|
||||||
"dependsOn": ["build"],
|
|
||||||
"inputs": [
|
|
||||||
"default",
|
|
||||||
"^production",
|
|
||||||
"{workspaceRoot}/jest.preset.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"build-base": {
|
|
||||||
"executor": "@nrwl/js:tsc",
|
|
||||||
"outputs": ["{options.outputPath}"],
|
|
||||||
"options": {
|
|
||||||
"outputPath": "build/packages/add-nx-to-monorepo",
|
|
||||||
"tsConfig": "packages/add-nx-to-monorepo/tsconfig.lib.json",
|
|
||||||
"packageJson": "packages/add-nx-to-monorepo/package.json",
|
|
||||||
"main": "packages/add-nx-to-monorepo/src/index.ts",
|
|
||||||
"updateBuildableProjectDepsInPackageJson": false,
|
|
||||||
"assets": [
|
|
||||||
"packages/add-nx-to-monorepo/*.md",
|
|
||||||
{
|
|
||||||
"input": "",
|
|
||||||
"glob": "LICENSE",
|
|
||||||
"output": "/"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"dependsOn": ["^build-base"],
|
|
||||||
"inputs": ["production", "^production"]
|
|
||||||
},
|
|
||||||
"build": {
|
|
||||||
"executor": "nx:run-commands",
|
|
||||||
"outputs": ["{workspaceRoot}/build/packages/add-nx-to-monorepo"],
|
|
||||||
"options": {
|
|
||||||
"commands": [
|
|
||||||
{
|
|
||||||
"command": "node ./scripts/chmod build/packages/add-nx-to-monorepo/src/add-nx-to-monorepo.js"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "node ./scripts/copy-readme.js add-nx-to-monorepo"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"parallel": false
|
|
||||||
},
|
|
||||||
"dependsOn": ["build-base"],
|
|
||||||
"inputs": ["production", "^production"]
|
|
||||||
},
|
|
||||||
"test-against-repo": {
|
|
||||||
"executor": "nx:run-commands",
|
|
||||||
"options": {
|
|
||||||
"commands": [
|
|
||||||
{
|
|
||||||
"command": "nx build add-nx-to-monorepo",
|
|
||||||
"forwardAllArgs": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "export JS_SCRIPT=$PWD/dist/packages/add-nx-to-monorepo/src/add-nx-to-monorepo.js && cd {args.repo} && echo $PWD && node $JS_SCRIPT",
|
|
||||||
"forwardAllArgs": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"parallel": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "nx-dev-feature-doc-viewer",
|
"name": "nx-dev-feature-doc-viewer",
|
||||||
"type": "lib",
|
"type": "lib",
|
||||||
@ -1626,80 +1497,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "e2e-add-nx-to-monorepo",
|
|
||||||
"type": "app",
|
|
||||||
"data": {
|
|
||||||
"tags": [],
|
|
||||||
"root": "e2e/add-nx-to-monorepo",
|
|
||||||
"files": [
|
|
||||||
{
|
|
||||||
"file": "e2e/add-nx-to-monorepo/jest.config.ts",
|
|
||||||
"hash": "cb1dea1f21be9ab44591f110ceca7aeda84a0de1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "e2e/add-nx-to-monorepo/project.json",
|
|
||||||
"hash": "8ff09d8d3c89b6754521cc8cc9add67b9a5bcefa"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "e2e/add-nx-to-monorepo/src/add-nx-to-monorepo.test.ts",
|
|
||||||
"hash": "a1d3b330d0678eecf960b301067fd982c1d9d0b3",
|
|
||||||
"deps": ["e2e-utils", "nx"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "e2e/add-nx-to-monorepo/tsconfig.json",
|
|
||||||
"hash": "6d5abf84832009a8c70e7a910c49f332bf1f0612"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "e2e/add-nx-to-monorepo/tsconfig.spec.json",
|
|
||||||
"hash": "1a24bfb0a13536cd17717808ca5609e15def438f"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"targets": {
|
|
||||||
"e2e": {
|
|
||||||
"executor": "nx:run-commands",
|
|
||||||
"options": {
|
|
||||||
"commands": [
|
|
||||||
{
|
|
||||||
"command": "yarn e2e-start-local-registry"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "yarn e2e-build-package-publish"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "nx run-e2e-tests e2e-add-nx-to-monorepo"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"parallel": false
|
|
||||||
},
|
|
||||||
"inputs": [
|
|
||||||
"default",
|
|
||||||
"^production",
|
|
||||||
{
|
|
||||||
"env": "SELECTED_CLI"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"env": "NX_E2E_CI_CACHE_KEY"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"run-e2e-tests": {
|
|
||||||
"executor": "@nrwl/jest:jest",
|
|
||||||
"options": {
|
|
||||||
"jestConfig": "e2e/add-nx-to-monorepo/jest.config.ts",
|
|
||||||
"passWithNoTests": true,
|
|
||||||
"runInBand": true
|
|
||||||
},
|
|
||||||
"outputs": ["{workspaceRoot}/coverage/e2e/add-nx-to-monorepo"],
|
|
||||||
"inputs": [
|
|
||||||
"default",
|
|
||||||
"^production",
|
|
||||||
"{workspaceRoot}/jest.preset.js"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "e2e-angular-extensions",
|
"name": "e2e-angular-extensions",
|
||||||
"type": "app",
|
"type": "app",
|
||||||
@ -25830,10 +25627,6 @@
|
|||||||
"file": "docs/generated/devkit/ngcli_adapter.md",
|
"file": "docs/generated/devkit/ngcli_adapter.md",
|
||||||
"hash": "dd62a5fbc75c8579574437234fb56436bb3a8d57"
|
"hash": "dd62a5fbc75c8579574437234fb56436bb3a8d57"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"file": "docs/generated/packages/add-nx-to-monorepo.json",
|
|
||||||
"hash": "7e9b8a37307774034db7cf43ff2c66628e779002"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"file": "docs/generated/packages/angular.json",
|
"file": "docs/generated/packages/angular.json",
|
||||||
"hash": "9dfbc789bcc954b861b2df7383ad440889bb1719"
|
"hash": "9dfbc789bcc954b861b2df7383ad440889bb1719"
|
||||||
@ -29353,150 +29146,6 @@
|
|||||||
},
|
},
|
||||||
"dependencies": { "nx-dev-data-access-packages:test": [] }
|
"dependencies": { "nx-dev-data-access-packages:test": [] }
|
||||||
},
|
},
|
||||||
"add-nx-to-monorepo:lint": {
|
|
||||||
"roots": ["add-nx-to-monorepo:lint"],
|
|
||||||
"tasks": {
|
|
||||||
"add-nx-to-monorepo:lint": {
|
|
||||||
"id": "add-nx-to-monorepo:lint",
|
|
||||||
"target": { "project": "add-nx-to-monorepo", "target": "lint" },
|
|
||||||
"projectRoot": "packages/add-nx-to-monorepo",
|
|
||||||
"overrides": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependencies": { "add-nx-to-monorepo:lint": [] }
|
|
||||||
},
|
|
||||||
"add-nx-to-monorepo:test": {
|
|
||||||
"roots": ["graph-client:build-base:release"],
|
|
||||||
"tasks": {
|
|
||||||
"add-nx-to-monorepo:test": {
|
|
||||||
"id": "add-nx-to-monorepo:test",
|
|
||||||
"target": { "project": "add-nx-to-monorepo", "target": "test" },
|
|
||||||
"projectRoot": "packages/add-nx-to-monorepo",
|
|
||||||
"overrides": {}
|
|
||||||
},
|
|
||||||
"add-nx-to-monorepo:build": {
|
|
||||||
"id": "add-nx-to-monorepo:build",
|
|
||||||
"target": { "project": "add-nx-to-monorepo", "target": "build" },
|
|
||||||
"projectRoot": "packages/add-nx-to-monorepo",
|
|
||||||
"overrides": { "__overrides_unparsed__": [] }
|
|
||||||
},
|
|
||||||
"add-nx-to-monorepo:build-base": {
|
|
||||||
"id": "add-nx-to-monorepo:build-base",
|
|
||||||
"target": { "project": "add-nx-to-monorepo", "target": "build-base" },
|
|
||||||
"projectRoot": "packages/add-nx-to-monorepo",
|
|
||||||
"overrides": { "__overrides_unparsed__": [] }
|
|
||||||
},
|
|
||||||
"nx:build-base": {
|
|
||||||
"id": "nx:build-base",
|
|
||||||
"target": { "project": "nx", "target": "build-base" },
|
|
||||||
"projectRoot": "packages/nx",
|
|
||||||
"overrides": { "__overrides_unparsed__": [] }
|
|
||||||
},
|
|
||||||
"graph-client:build-base:release": {
|
|
||||||
"id": "graph-client:build-base:release",
|
|
||||||
"target": {
|
|
||||||
"project": "graph-client",
|
|
||||||
"target": "build-base",
|
|
||||||
"configuration": "release"
|
|
||||||
},
|
|
||||||
"projectRoot": "graph/client",
|
|
||||||
"overrides": { "__overrides_unparsed__": [] }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"add-nx-to-monorepo:test": ["add-nx-to-monorepo:build"],
|
|
||||||
"add-nx-to-monorepo:build": ["add-nx-to-monorepo:build-base"],
|
|
||||||
"add-nx-to-monorepo:build-base": ["nx:build-base"],
|
|
||||||
"nx:build-base": ["graph-client:build-base:release"],
|
|
||||||
"graph-client:build-base:release": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"add-nx-to-monorepo:build-base": {
|
|
||||||
"roots": ["graph-client:build-base:release"],
|
|
||||||
"tasks": {
|
|
||||||
"add-nx-to-monorepo:build-base": {
|
|
||||||
"id": "add-nx-to-monorepo:build-base",
|
|
||||||
"target": { "project": "add-nx-to-monorepo", "target": "build-base" },
|
|
||||||
"projectRoot": "packages/add-nx-to-monorepo",
|
|
||||||
"overrides": {}
|
|
||||||
},
|
|
||||||
"nx:build-base": {
|
|
||||||
"id": "nx:build-base",
|
|
||||||
"target": { "project": "nx", "target": "build-base" },
|
|
||||||
"projectRoot": "packages/nx",
|
|
||||||
"overrides": { "__overrides_unparsed__": [] }
|
|
||||||
},
|
|
||||||
"graph-client:build-base:release": {
|
|
||||||
"id": "graph-client:build-base:release",
|
|
||||||
"target": {
|
|
||||||
"project": "graph-client",
|
|
||||||
"target": "build-base",
|
|
||||||
"configuration": "release"
|
|
||||||
},
|
|
||||||
"projectRoot": "graph/client",
|
|
||||||
"overrides": { "__overrides_unparsed__": [] }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"add-nx-to-monorepo:build-base": ["nx:build-base"],
|
|
||||||
"nx:build-base": ["graph-client:build-base:release"],
|
|
||||||
"graph-client:build-base:release": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"add-nx-to-monorepo:build": {
|
|
||||||
"roots": ["graph-client:build-base:release"],
|
|
||||||
"tasks": {
|
|
||||||
"add-nx-to-monorepo:build": {
|
|
||||||
"id": "add-nx-to-monorepo:build",
|
|
||||||
"target": { "project": "add-nx-to-monorepo", "target": "build" },
|
|
||||||
"projectRoot": "packages/add-nx-to-monorepo",
|
|
||||||
"overrides": {}
|
|
||||||
},
|
|
||||||
"add-nx-to-monorepo:build-base": {
|
|
||||||
"id": "add-nx-to-monorepo:build-base",
|
|
||||||
"target": { "project": "add-nx-to-monorepo", "target": "build-base" },
|
|
||||||
"projectRoot": "packages/add-nx-to-monorepo",
|
|
||||||
"overrides": { "__overrides_unparsed__": [] }
|
|
||||||
},
|
|
||||||
"nx:build-base": {
|
|
||||||
"id": "nx:build-base",
|
|
||||||
"target": { "project": "nx", "target": "build-base" },
|
|
||||||
"projectRoot": "packages/nx",
|
|
||||||
"overrides": { "__overrides_unparsed__": [] }
|
|
||||||
},
|
|
||||||
"graph-client:build-base:release": {
|
|
||||||
"id": "graph-client:build-base:release",
|
|
||||||
"target": {
|
|
||||||
"project": "graph-client",
|
|
||||||
"target": "build-base",
|
|
||||||
"configuration": "release"
|
|
||||||
},
|
|
||||||
"projectRoot": "graph/client",
|
|
||||||
"overrides": { "__overrides_unparsed__": [] }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"add-nx-to-monorepo:build": ["add-nx-to-monorepo:build-base"],
|
|
||||||
"add-nx-to-monorepo:build-base": ["nx:build-base"],
|
|
||||||
"nx:build-base": ["graph-client:build-base:release"],
|
|
||||||
"graph-client:build-base:release": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"add-nx-to-monorepo:test-against-repo": {
|
|
||||||
"roots": ["add-nx-to-monorepo:test-against-repo"],
|
|
||||||
"tasks": {
|
|
||||||
"add-nx-to-monorepo:test-against-repo": {
|
|
||||||
"id": "add-nx-to-monorepo:test-against-repo",
|
|
||||||
"target": {
|
|
||||||
"project": "add-nx-to-monorepo",
|
|
||||||
"target": "test-against-repo"
|
|
||||||
},
|
|
||||||
"projectRoot": "packages/add-nx-to-monorepo",
|
|
||||||
"overrides": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependencies": { "add-nx-to-monorepo:test-against-repo": [] }
|
|
||||||
},
|
|
||||||
"nx-dev-feature-doc-viewer:lint": {
|
"nx-dev-feature-doc-viewer:lint": {
|
||||||
"roots": ["nx-dev-feature-doc-viewer:lint"],
|
"roots": ["nx-dev-feature-doc-viewer:lint"],
|
||||||
"tasks": {
|
"tasks": {
|
||||||
@ -30079,33 +29728,6 @@
|
|||||||
},
|
},
|
||||||
"dependencies": { "nx-dev-data-access-menu:test": [] }
|
"dependencies": { "nx-dev-data-access-menu:test": [] }
|
||||||
},
|
},
|
||||||
"e2e-add-nx-to-monorepo:e2e": {
|
|
||||||
"roots": ["e2e-add-nx-to-monorepo:e2e"],
|
|
||||||
"tasks": {
|
|
||||||
"e2e-add-nx-to-monorepo:e2e": {
|
|
||||||
"id": "e2e-add-nx-to-monorepo:e2e",
|
|
||||||
"target": { "project": "e2e-add-nx-to-monorepo", "target": "e2e" },
|
|
||||||
"projectRoot": "e2e/add-nx-to-monorepo",
|
|
||||||
"overrides": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependencies": { "e2e-add-nx-to-monorepo:e2e": [] }
|
|
||||||
},
|
|
||||||
"e2e-add-nx-to-monorepo:run-e2e-tests": {
|
|
||||||
"roots": ["e2e-add-nx-to-monorepo:run-e2e-tests"],
|
|
||||||
"tasks": {
|
|
||||||
"e2e-add-nx-to-monorepo:run-e2e-tests": {
|
|
||||||
"id": "e2e-add-nx-to-monorepo:run-e2e-tests",
|
|
||||||
"target": {
|
|
||||||
"project": "e2e-add-nx-to-monorepo",
|
|
||||||
"target": "run-e2e-tests"
|
|
||||||
},
|
|
||||||
"projectRoot": "e2e/add-nx-to-monorepo",
|
|
||||||
"overrides": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependencies": { "e2e-add-nx-to-monorepo:run-e2e-tests": [] }
|
|
||||||
},
|
|
||||||
"e2e-angular-extensions:e2e": {
|
"e2e-angular-extensions:e2e": {
|
||||||
"roots": ["e2e-angular-extensions:e2e"],
|
"roots": ["e2e-angular-extensions:e2e"],
|
||||||
"tasks": {
|
"tasks": {
|
||||||
|
|||||||
@ -63,7 +63,7 @@ By default `useNx` will be set to `false`, so you have to explicitly opt-in.
|
|||||||
|
|
||||||
**3. Create a nx.json (optional but recommended)**
|
**3. Create a nx.json (optional but recommended)**
|
||||||
|
|
||||||
Nx works even without `nx.json` but to configure some more details such as the `cacheableOperations` of your monorepo in particular, create a `nx.json` at the root of the monorepo. Alternatively you can also just run `npx nx init` to have one generated. Specify the cacheable operations, usually something like `build`, `test`, `lint` etc, depending on your workspace setup:
|
Nx works even without `nx.json` but to configure some more details such as the `cacheableOperations` of your monorepo in particular, create a `nx.json` at the root of the monorepo. Alternatively you can also just run `npx nx@latest init` to have one generated. Specify the cacheable operations, usually something like `build`, `test`, `lint` etc, depending on your workspace setup:
|
||||||
|
|
||||||
```json {% fileName="nx.json" %}
|
```json {% fileName="nx.json" %}
|
||||||
{
|
{
|
||||||
@ -90,7 +90,7 @@ This does not include distributed caching or distributed task execution powered
|
|||||||
Nx can be added to an existing Lerna monorepo by running the following command:
|
Nx can be added to an existing Lerna monorepo by running the following command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npx add-nx-to-monorepo
|
npx nx@latest init
|
||||||
```
|
```
|
||||||
|
|
||||||
This will
|
This will
|
||||||
|
|||||||
@ -7,7 +7,7 @@ Within an Nx workspace, you gain many capabilities that help you build applicati
|
|||||||
You can migrate to a [Standalone Angular App](/concepts/integrated-vs-package-based#standalone-applications) with the command:
|
You can migrate to a [Standalone Angular App](/concepts/integrated-vs-package-based#standalone-applications) with the command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npx nx init
|
npx nx@latest init
|
||||||
```
|
```
|
||||||
|
|
||||||
This command will install the correct version of Nx based on your Angular version.
|
This command will install the correct version of Nx based on your Angular version.
|
||||||
|
|||||||
@ -7,7 +7,7 @@ Create-React-App (CRA) is one of the most widely used tool for creating, buildin
|
|||||||
The easiest way to setup Nx in your CRA project is to use the automated migration tool.
|
The easiest way to setup Nx in your CRA project is to use the automated migration tool.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npx nx init
|
npx nx@latest init
|
||||||
```
|
```
|
||||||
|
|
||||||
{% callout type="note" title="Want to migrate to a monorepo instead?" %}
|
{% callout type="note" title="Want to migrate to a monorepo instead?" %}
|
||||||
@ -25,7 +25,7 @@ You will notice that the project now uses [Vite](https://vitejs.dev/) and [Vites
|
|||||||
test your application. Vite is a next-gen tooling for building frontend applications, and is much faster than Webpack (
|
test your application. Vite is a next-gen tooling for building frontend applications, and is much faster than Webpack (
|
||||||
which CRA uses).
|
which CRA uses).
|
||||||
|
|
||||||
If you do not want to use Vite, you can run `npx nx init --vite=false` instead.
|
If you do not want to use Vite, you can run `npx nx@latest init --vite=false` instead.
|
||||||
{% /callout %}
|
{% /callout %}
|
||||||
|
|
||||||
## Try Nx
|
## Try Nx
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
export default {
|
|
||||||
transform: {
|
|
||||||
'^.+\\.[tj]sx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
|
||||||
},
|
|
||||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
|
|
||||||
maxWorkers: 1,
|
|
||||||
globals: {},
|
|
||||||
displayName: 'e2e-add-nx-to-monorepo',
|
|
||||||
preset: '../../jest.preset.js',
|
|
||||||
};
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "e2e-add-nx-to-monorepo",
|
|
||||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
||||||
"sourceRoot": "e2e/add-nx-to-monorepo",
|
|
||||||
"projectType": "application",
|
|
||||||
"targets": {
|
|
||||||
"e2e": {},
|
|
||||||
"run-e2e-tests": {}
|
|
||||||
},
|
|
||||||
"implicitDependencies": ["workspace"]
|
|
||||||
}
|
|
||||||
@ -1,79 +0,0 @@
|
|||||||
import {
|
|
||||||
createNonNxProjectDirectory,
|
|
||||||
runCLI,
|
|
||||||
runCommand,
|
|
||||||
updateFile,
|
|
||||||
getPackageManagerCommand,
|
|
||||||
getSelectedPackageManager,
|
|
||||||
getPublishedVersion,
|
|
||||||
} from '@nrwl/e2e/utils';
|
|
||||||
|
|
||||||
describe('add-nx-to-monorepo', () => {
|
|
||||||
const pmc = getPackageManagerCommand({
|
|
||||||
packageManager: getSelectedPackageManager(),
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should not throw', () => {
|
|
||||||
if (pmc.runUninstalledPackage) {
|
|
||||||
// Arrange
|
|
||||||
createNonNxProjectDirectory();
|
|
||||||
runCommand(pmc.install);
|
|
||||||
updateFile(
|
|
||||||
'packages/package-a/package.json',
|
|
||||||
JSON.stringify({
|
|
||||||
name: 'package-a',
|
|
||||||
scripts: {
|
|
||||||
serve: 'some serve',
|
|
||||||
build: 'some build',
|
|
||||||
test: 'some test',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
);
|
|
||||||
updateFile(
|
|
||||||
'packages/package-b/package.json',
|
|
||||||
JSON.stringify({
|
|
||||||
name: 'package-b',
|
|
||||||
scripts: {
|
|
||||||
lint: 'some lint',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
// Act
|
|
||||||
const output = runCommand(
|
|
||||||
`${
|
|
||||||
pmc.runUninstalledPackage
|
|
||||||
} add-nx-to-monorepo@${getPublishedVersion()} -y`
|
|
||||||
);
|
|
||||||
// Assert
|
|
||||||
expect(output).toContain('🎉 Done!');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should build', () => {
|
|
||||||
if (pmc.runUninstalledPackage) {
|
|
||||||
// Arrange
|
|
||||||
createNonNxProjectDirectory();
|
|
||||||
runCommand(pmc.runUninstalledPackage);
|
|
||||||
updateFile(
|
|
||||||
'packages/package-a/package.json',
|
|
||||||
JSON.stringify({
|
|
||||||
name: 'package-a',
|
|
||||||
scripts: {
|
|
||||||
build: 'echo "build successful"',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
// Act
|
|
||||||
runCommand(
|
|
||||||
`${
|
|
||||||
pmc.runUninstalledPackage
|
|
||||||
} add-nx-to-monorepo@${getPublishedVersion()} -y`
|
|
||||||
);
|
|
||||||
const output = runCLI('build package-a');
|
|
||||||
// Assert
|
|
||||||
expect(output).toContain('build successful');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.base.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"types": ["node", "jest"]
|
|
||||||
},
|
|
||||||
"include": [],
|
|
||||||
"files": [],
|
|
||||||
"references": [
|
|
||||||
{
|
|
||||||
"path": "./tsconfig.spec.json"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "./tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "../../dist/out-tsc",
|
|
||||||
"module": "commonjs",
|
|
||||||
"types": ["jest", "node"]
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.tsx",
|
|
||||||
"**/*.test.tsx",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.spec.jsx",
|
|
||||||
"**/*.test.jsx",
|
|
||||||
"**/*.d.ts",
|
|
||||||
"jest.config.ts"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -45,7 +45,6 @@ export function getPackagesSections(items: MenuItem[]): MenuSection[] {
|
|||||||
return items
|
return items
|
||||||
.filter(
|
.filter(
|
||||||
(m) =>
|
(m) =>
|
||||||
m.id !== 'add-nx-to-monorepo' &&
|
|
||||||
m.id !== 'cra-to-nx' &&
|
m.id !== 'cra-to-nx' &&
|
||||||
m.id !== 'create-nx-plugin' &&
|
m.id !== 'create-nx-plugin' &&
|
||||||
m.id !== 'create-nx-workspace' &&
|
m.id !== 'create-nx-workspace' &&
|
||||||
|
|||||||
@ -28,7 +28,6 @@ export function filterMigrationPackages<ItemType extends { name: string }>(
|
|||||||
itemList: ItemType[]
|
itemList: ItemType[]
|
||||||
): ItemType[] {
|
): ItemType[] {
|
||||||
const nxPackageNames = [
|
const nxPackageNames = [
|
||||||
'add-nx-to-monorepo',
|
|
||||||
'create-nx-workspace',
|
'create-nx-workspace',
|
||||||
'create-nx-plugin',
|
'create-nx-plugin',
|
||||||
'cra-to-nx',
|
'cra-to-nx',
|
||||||
|
|||||||
@ -33,7 +33,6 @@ export async function getStaticProps(): Promise<{ props: CommunityProps }> {
|
|||||||
|
|
||||||
const officialPluginList = (nxPackagesApi.getRootPackageIndex() ?? []).filter(
|
const officialPluginList = (nxPackagesApi.getRootPackageIndex() ?? []).filter(
|
||||||
(m) =>
|
(m) =>
|
||||||
m.name !== 'add-nx-to-monorepo' &&
|
|
||||||
m.name !== 'cra-to-nx' &&
|
m.name !== 'cra-to-nx' &&
|
||||||
m.name !== 'create-nx-plugin' &&
|
m.name !== 'create-nx-plugin' &&
|
||||||
m.name !== 'create-nx-workspace' &&
|
m.name !== 'create-nx-workspace' &&
|
||||||
|
|||||||
@ -506,6 +506,7 @@ const packagesDocuments = {
|
|||||||
'/packages/storybook/documents/migrate-storybook-7':
|
'/packages/storybook/documents/migrate-storybook-7':
|
||||||
'/packages/storybook/generators/migrate-7',
|
'/packages/storybook/generators/migrate-7',
|
||||||
'/linter/eslint-plugin-nx': '/packages/linter/documents/eslint-plugin-nx',
|
'/linter/eslint-plugin-nx': '/packages/linter/documents/eslint-plugin-nx',
|
||||||
|
'/packages/add-nx-to-monorepo': '/packages/nx/documents/init',
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -118,9 +118,7 @@ export function MonorepoStyles(): JSX.Element {
|
|||||||
</span>{' '}
|
</span>{' '}
|
||||||
<span>$</span>
|
<span>$</span>
|
||||||
</p>
|
</p>
|
||||||
<p className="typing mt-0.5 flex-1 pl-2">
|
<p className="typing mt-0.5 flex-1 pl-2">npx nx@latest init</p>
|
||||||
npx add-nx-to-monorepo
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-4 flex">
|
<div className="mt-4 flex">
|
||||||
<p className="typing flex-1 items-center pl-2">
|
<p className="typing flex-1 items-center pl-2">
|
||||||
@ -130,14 +128,6 @@ export function MonorepoStyles(): JSX.Element {
|
|||||||
🐳 Nx initialization
|
🐳 Nx initialization
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-4 flex">
|
|
||||||
<p className="typing flex-1 items-center pl-2">
|
|
||||||
<span className="mr-2 bg-pink-300 px-1 py-0.5 dark:bg-fuchsia-600">
|
|
||||||
NX
|
|
||||||
</span>
|
|
||||||
🧑🔧 Analyzing the source code and creating configuration files
|
|
||||||
</p>
|
|
||||||
</div>{' '}
|
|
||||||
<div className="mt-4 flex">
|
<div className="mt-4 flex">
|
||||||
<p className="typing flex-1 items-center pl-2">
|
<p className="typing flex-1 items-center pl-2">
|
||||||
<span className="mr-2 bg-pink-300 px-1 py-0.5 dark:bg-fuchsia-600">
|
<span className="mr-2 bg-pink-300 px-1 py-0.5 dark:bg-fuchsia-600">
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["../../.eslintrc.json"],
|
|
||||||
"ignorePatterns": ["!**/*"],
|
|
||||||
"rules": {}
|
|
||||||
}
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
# `> npx add-nx-to-monorepo`
|
|
||||||
|
|
||||||
<p align="center"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx.png" width="600"></p>
|
|
||||||
|
|
||||||
<div align="center">
|
|
||||||
|
|
||||||
[]()
|
|
||||||
[](https://www.npmjs.com/@nrwl/workspace)
|
|
||||||
[](https://gitter.im/nrwl-nx/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
||||||
[](https://join.slack.com/t/nrwlcommunity/shared_invite/enQtNzU5MTE4OTQwOTk0LTgxY2E0ZWYzMWE0YzA5ZDA2MWM1NDVhNmI2ZWMyYmZhNWJiODk3MjkxZjY3MzU5ZjRmM2NmNWU1OTgyZmE4Mzc)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
An easy way to add Nx computation caching to any monorepo (Yarn Workspaces, PNPM, Lerna, etc).
|
|
||||||
|
|
||||||
Simply run: `npx add-nx-to-monorepo` in your monorepo.
|
|
||||||
|
|
||||||
## Learn More
|
|
||||||
|
|
||||||
- [Guide: Add Nx to Lerna / Yarn / PNPM / NPM Workspaces](/recipes/adopting-nx/adding-to-monorepo#adding-nx-to-lernayarnpnpmnpm-workspace)
|
|
||||||
- [Video: https://youtu.be/Dq2ftPf3sn4]
|
|
||||||
- See [https://github.com/nrwl/nx](https://github.com/nrwl/nx) to learn more about Nx.
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
|
|
||||||
import { execSync } from 'child_process';
|
|
||||||
|
|
||||||
const args = process.argv.slice(2).join(' ');
|
|
||||||
execSync(`npx --yes nx@latest init ${args}`, {
|
|
||||||
stdio: [0, 1, 2],
|
|
||||||
});
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
export default {
|
|
||||||
displayName: 'add-nx-to-monorepo',
|
|
||||||
|
|
||||||
globals: {},
|
|
||||||
transform: {
|
|
||||||
'^.+\\.[tj]sx?$': [
|
|
||||||
'ts-jest',
|
|
||||||
{
|
|
||||||
tsConfig: '<rootDir>/tsconfig.spec.json',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
|
||||||
coverageDirectory: '../../coverage/projects/add-nx-to-monorepo',
|
|
||||||
preset: '../../jest.preset.js',
|
|
||||||
};
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "add-nx-to-monorepo",
|
|
||||||
"version": "0.0.1",
|
|
||||||
"private": false,
|
|
||||||
"description": "Make any monorepo faster by adding Nx to it",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/nrwl/nx.git",
|
|
||||||
"directory": "packages/add-nx-to-monorepo"
|
|
||||||
},
|
|
||||||
"keywords": [
|
|
||||||
"Monorepo",
|
|
||||||
"React",
|
|
||||||
"Web",
|
|
||||||
"Node",
|
|
||||||
"Nest",
|
|
||||||
"Lerna",
|
|
||||||
"Yarn",
|
|
||||||
"CLI"
|
|
||||||
],
|
|
||||||
"bin": {
|
|
||||||
"add-nx-to-monorepo": "./index.js"
|
|
||||||
},
|
|
||||||
"author": "Victor Savkin",
|
|
||||||
"license": "MIT",
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/nrwl/nx/issues"
|
|
||||||
},
|
|
||||||
"homepage": "https://nx.dev",
|
|
||||||
"publishConfig": {
|
|
||||||
"access": "public"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,59 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "add-nx-to-monorepo",
|
|
||||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
||||||
"sourceRoot": "packages/add-nx-to-monorepo",
|
|
||||||
"projectType": "library",
|
|
||||||
"targets": {
|
|
||||||
"lint": {},
|
|
||||||
"test": {},
|
|
||||||
"build-base": {
|
|
||||||
"executor": "@nrwl/js:tsc",
|
|
||||||
"options": {
|
|
||||||
"outputPath": "build/packages/add-nx-to-monorepo",
|
|
||||||
"tsConfig": "packages/add-nx-to-monorepo/tsconfig.lib.json",
|
|
||||||
"packageJson": "packages/add-nx-to-monorepo/package.json",
|
|
||||||
"main": "packages/add-nx-to-monorepo/index.ts",
|
|
||||||
"updateBuildableProjectDepsInPackageJson": false,
|
|
||||||
"assets": [
|
|
||||||
"packages/add-nx-to-monorepo/*.md",
|
|
||||||
{
|
|
||||||
"input": "",
|
|
||||||
"glob": "LICENSE",
|
|
||||||
"output": "/"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"build": {
|
|
||||||
"executor": "nx:run-commands",
|
|
||||||
"outputs": ["{workspaceRoot}/build/packages/add-nx-to-monorepo"],
|
|
||||||
"options": {
|
|
||||||
"commands": [
|
|
||||||
{
|
|
||||||
"command": "node ./scripts/chmod build/packages/add-nx-to-monorepo/index.js"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "node ./scripts/copy-readme.js add-nx-to-monorepo"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"parallel": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"test-against-repo": {
|
|
||||||
"executor": "nx:run-commands",
|
|
||||||
"options": {
|
|
||||||
"commands": [
|
|
||||||
{
|
|
||||||
"command": "nx build add-nx-to-monorepo",
|
|
||||||
"forwardAllArgs": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "export JS_SCRIPT=$PWD/dist/packages/add-nx-to-monorepo/index.js && cd {args.repo} && echo $PWD && node $JS_SCRIPT",
|
|
||||||
"forwardAllArgs": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"parallel": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.base.json",
|
|
||||||
"files": [],
|
|
||||||
"include": [],
|
|
||||||
"references": [
|
|
||||||
{
|
|
||||||
"path": "./tsconfig.lib.json"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./tsconfig.spec.json"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "./tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "commonjs",
|
|
||||||
"outDir": "../../dist/out-tsc",
|
|
||||||
"declaration": false,
|
|
||||||
"types": ["node"],
|
|
||||||
"importHelpers": false,
|
|
||||||
"sourceMap": false
|
|
||||||
},
|
|
||||||
"exclude": ["**/*.spec.ts", "jest.config.ts"],
|
|
||||||
"include": ["**/*.ts"]
|
|
||||||
}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "./tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "../../dist/out-tsc",
|
|
||||||
"module": "commonjs",
|
|
||||||
"types": ["jest", "node"]
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.tsx",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.jsx",
|
|
||||||
"**/*.d.ts",
|
|
||||||
"jest.config.ts"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -42,11 +42,8 @@ function main() {
|
|||||||
`To create a workspace run:`,
|
`To create a workspace run:`,
|
||||||
chalk.bold.white(`npx create-nx-workspace@latest <workspace name>`),
|
chalk.bold.white(`npx create-nx-workspace@latest <workspace name>`),
|
||||||
'',
|
'',
|
||||||
`To add Nx to existing workspace run with a workspace-specific nx.json:`,
|
`To add Nx to an existing workspace with a workspace-specific nx.json, run:`,
|
||||||
chalk.bold.white(`npx add-nx-to-monorepo@latest`),
|
chalk.bold.white(`npx nx@latest init`),
|
||||||
'',
|
|
||||||
`To add the default nx.json file run:`,
|
|
||||||
chalk.bold.white(`nx init`),
|
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -94,7 +94,7 @@ export function createCache(
|
|||||||
const newValue: ProjectGraphCache = {
|
const newValue: ProjectGraphCache = {
|
||||||
version: projectGraph.version || '5.1',
|
version: projectGraph.version || '5.1',
|
||||||
deps: packageJsonDeps,
|
deps: packageJsonDeps,
|
||||||
// compilerOptions may not exist, especially for repos converted through add-nx-to-monorepo
|
// compilerOptions may not exist, especially for package-based repos
|
||||||
pathMappings: tsConfig?.compilerOptions?.paths || {},
|
pathMappings: tsConfig?.compilerOptions?.paths || {},
|
||||||
nxJsonPlugins,
|
nxJsonPlugins,
|
||||||
pluginsConfig: nxJson.pluginsConfig,
|
pluginsConfig: nxJson.pluginsConfig,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user