Compare commits

...

1 Commits

Author SHA1 Message Date
Max Kless fcfd75e46a chore(repo): format everything to test in PR 2024-07-25 11:07:12 +02:00
5288 changed files with 539947 additions and 531818 deletions
+145 -145
View File
@@ -4,176 +4,176 @@ version: 2.1
# ORBS
# -------------------------
orbs:
nx: nrwl/nx@1.6.2
rust: circleci/rust@1.6.0
browser-tools: circleci/browser-tools@1.4.8
nx: nrwl/nx@1.6.2
rust: circleci/rust@1.6.0
browser-tools: circleci/browser-tools@1.4.8
# -------------------------
# EXECUTORS
# -------------------------
defaults: &defaults
working_directory: ~/repo
working_directory: ~/repo
executors:
linux:
<<: *defaults
docker:
- image: cimg/rust:1.73.0-browsers
resource_class: medium+
linux:
<<: *defaults
docker:
- image: cimg/rust:1.73.0-browsers
resource_class: medium+
macos:
<<: *defaults
resource_class: macos.m1.medium.gen1
macos:
xcode: '14.2.0'
macos:
<<: *defaults
resource_class: macos.m1.medium.gen1
macos:
xcode: '14.2.0'
# -------------------------
# COMMANDS
# -------------------------
commands:
run-pnpm-install:
parameters:
os:
type: string
steps:
- restore_cache:
name: Restore pnpm Package Cache
keys:
- node-deps-{{ arch }}-v3-{{ checksum "pnpm-lock.yaml" }}
- when:
condition:
equal: [<< parameters.os >>, linux]
steps:
- run:
name: Install pnpm package manager (linux)
command: |
npm install --prefix=$HOME/.local -g @pnpm/exe@8
- when:
condition:
equal: [<< parameters.os >>, macos]
steps:
- run:
name: Install pnpm package manager (macos)
command: |
npm install -g @pnpm/exe@8
- run:
name: Install Dependencies
command: |
pnpm install --frozen-lockfile
pnpm playwright install --with-deps
- save_cache:
name: Save pnpm Package Cache
key: node-deps-{{ arch }}-v3-{{ checksum "pnpm-lock.yaml" }}
paths:
- ~/.pnpm-store
- ~/.cache/Cypress
- node_modules
run-pnpm-install:
parameters:
os:
type: string
steps:
- restore_cache:
name: Restore pnpm Package Cache
keys:
- node-deps-{{ arch }}-v3-{{ checksum "pnpm-lock.yaml" }}
- when:
condition:
equal: [<< parameters.os >>, linux]
steps:
- run:
name: Install pnpm package manager (linux)
command: |
npm install --prefix=$HOME/.local -g @pnpm/exe@8
- when:
condition:
equal: [<< parameters.os >>, macos]
steps:
- run:
name: Install pnpm package manager (macos)
command: |
npm install -g @pnpm/exe@8
- run:
name: Install Dependencies
command: |
pnpm install --frozen-lockfile
pnpm playwright install --with-deps
- save_cache:
name: Save pnpm Package Cache
key: node-deps-{{ arch }}-v3-{{ checksum "pnpm-lock.yaml" }}
paths:
- ~/.pnpm-store
- ~/.cache/Cypress
- node_modules
# -------------------------
# JOBS
# -------------------------
jobs:
# -------------------------
# JOBS: Main Linux
# -------------------------
main-linux:
executor: linux
environment:
NX_E2E_CI_CACHE_KEY: e2e-circleci-linux
NX_DAEMON: 'true'
NX_PERF_LOGGING: 'false'
NX_NATIVE_LOGGING: 'false'
NX_E2E_RUN_E2E: 'true'
NX_CI_EXECUTION_ENV: 'linux'
NX_CLOUD_DTE_V2: 'true'
NX_CLOUD_DTE_SUMMARY: 'true'
steps:
- checkout
- nx/set-shas:
main-branch-name: 'master'
- run: npx nx-cloud@next start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml" --stop-agents-after="e2e"
- run:
command: |
sudo apt-get update
sudo apt-get install -y ca-certificates lsof libvips-dev libglib2.0-dev libgirepository1.0-dev
- browser-tools/install-chrome
- run-pnpm-install:
os: linux
- run:
name: Check Documentation
command: pnpm nx documentation --no-dte
no_output_timeout: 20m
- run:
name: Run Checks/Lint/Test/Build
no_output_timeout: 60m
command: |
pids=()
# -------------------------
# JOBS: Main Linux
# -------------------------
main-linux:
executor: linux
environment:
NX_E2E_CI_CACHE_KEY: e2e-circleci-linux
NX_DAEMON: 'true'
NX_PERF_LOGGING: 'false'
NX_NATIVE_LOGGING: 'false'
NX_E2E_RUN_E2E: 'true'
NX_CI_EXECUTION_ENV: 'linux'
NX_CLOUD_DTE_V2: 'true'
NX_CLOUD_DTE_SUMMARY: 'true'
steps:
- checkout
- nx/set-shas:
main-branch-name: 'master'
- run: npx nx-cloud@next start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml" --stop-agents-after="e2e"
- run:
command: |
sudo apt-get update
sudo apt-get install -y ca-certificates lsof libvips-dev libglib2.0-dev libgirepository1.0-dev
- browser-tools/install-chrome
- run-pnpm-install:
os: linux
- run:
name: Check Documentation
command: pnpm nx documentation --no-dte
no_output_timeout: 20m
- run:
name: Run Checks/Lint/Test/Build
no_output_timeout: 60m
command: |
pids=()
pnpm nx-cloud record -- nx format:check --base=$NX_BASE --head=$NX_HEAD &
pids+=($!)
pnpm nx-cloud record -- nx format:check --base=$NX_BASE --head=$NX_HEAD &
pids+=($!)
pnpm nx run-many -t check-imports check-commit check-lock-files check-codeowners documentation --parallel=1 --no-dte &
pids+=($!)
pnpm nx run-many -t check-imports check-commit check-lock-files check-codeowners documentation --parallel=1 --no-dte &
pids+=($!)
pnpm nx affected --targets=lint,test,build,e2e,e2e-ci --base=$NX_BASE --head=$NX_HEAD --parallel=3 &
pids+=($!)
pnpm nx affected --targets=lint,test,build,e2e,e2e-ci --base=$NX_BASE --head=$NX_HEAD --parallel=3 &
pids+=($!)
for pid in "${pids[@]}"; do
wait "$pid"
done
# -------------------------
# JOBS: Main-MacOS
# -------------------------
mainmacos:
executor: macos
environment:
NX_E2E_CI_CACHE_KEY: e2e-circleci-macos
NX_PERF_LOGGING: 'false'
NX_CI_EXECUTION_ENV: 'macos'
SELECTED_PM: 'npm' # explicitly define npm for macOS tests
steps:
- checkout
- restore_cache:
name: Restore Homebrew packages
keys:
- nrwl-nx-homebrew-packages
- run:
name: Configure Detox Environment, Install applesimutils
command: |
HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
xcrun simctl shutdown all && xcrun simctl erase all
no_output_timeout: 20m
- save_cache:
name: Save Homebrew Cache
key: nrwl-nx-homebrew-packages
paths:
- /usr/local/Homebrew
- ~/Library/Caches/Homebrew
- run-pnpm-install:
os: macos
- rust/install
- nx/set-shas:
main-branch-name: 'master'
- run:
name: Run E2E Tests for macOS
command: |
HAS_CHANGED=$(node ./scripts/check-react-native-changes.js $NX_BASE $NX_HEAD);
if $HAS_CHANGED; then
pnpm nx affected -t e2e-macos-ci --parallel=1 --base=$NX_BASE --head=$NX_HEAD
else
echo "Skip E2E tests for macOS as there are no changes in React Native projects."
fi
no_output_timeout: 45m
for pid in "${pids[@]}"; do
wait "$pid"
done
# -------------------------
# JOBS: Main-MacOS
# -------------------------
mainmacos:
executor: macos
environment:
NX_E2E_CI_CACHE_KEY: e2e-circleci-macos
NX_PERF_LOGGING: 'false'
NX_CI_EXECUTION_ENV: 'macos'
SELECTED_PM: 'npm' # explicitly define npm for macOS tests
steps:
- checkout
- restore_cache:
name: Restore Homebrew packages
keys:
- nrwl-nx-homebrew-packages
- run:
name: Configure Detox Environment, Install applesimutils
command: |
HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
xcrun simctl shutdown all && xcrun simctl erase all
no_output_timeout: 20m
- save_cache:
name: Save Homebrew Cache
key: nrwl-nx-homebrew-packages
paths:
- /usr/local/Homebrew
- ~/Library/Caches/Homebrew
- run-pnpm-install:
os: macos
- rust/install
- nx/set-shas:
main-branch-name: 'master'
- run:
name: Run E2E Tests for macOS
command: |
HAS_CHANGED=$(node ./scripts/check-react-native-changes.js $NX_BASE $NX_HEAD);
if $HAS_CHANGED; then
pnpm nx affected -t e2e-macos-ci --parallel=1 --base=$NX_BASE --head=$NX_HEAD
else
echo "Skip E2E tests for macOS as there are no changes in React Native projects."
fi
no_output_timeout: 45m
# -------------------------
# WORKFLOWS(JOBS)
# -------------------------
workflows:
version: 2
version: 2
build:
jobs:
- main-linux
- mainmacos:
name: main-macos-e2e
build:
jobs:
- main-linux
- mainmacos:
name: main-macos-e2e
+28 -28
View File
@@ -1,33 +1,33 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "NxDevContainer",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"build": {
// Path is relative to the devcontainer.json file.
"dockerfile": "Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/rust:1": {}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// 4211 = nx graph port
"forwardPorts": [4211],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "./.devcontainer/postCreateCommand.sh",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"nrwl.angular-console",
"firsttris.vscode-jest-runner",
"eamodio.gitlens"
],
"settings": {
"debug.javascript.autoAttachFilter": "onlyWithFlag" // workaround for that issue: https://github.com/microsoft/vscode-js-debug/issues/374#issuecomment-622239998
"name": "NxDevContainer",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"build": {
// Path is relative to the devcontainer.json file.
"dockerfile": "Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/rust:1": {}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// 4211 = nx graph port
"forwardPorts": [4211],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "./.devcontainer/postCreateCommand.sh",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"nrwl.angular-console",
"firsttris.vscode-jest-runner",
"eamodio.gitlens"
],
"settings": {
"debug.javascript.autoAttachFilter": "onlyWithFlag" // workaround for that issue: https://github.com/microsoft/vscode-js-debug/issues/374#issuecomment-622239998
}
}
}
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
+67 -64
View File
@@ -1,68 +1,71 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"env": {
"node": true
},
"ignorePatterns": ["**/*.ts"],
"plugins": ["@typescript-eslint", "@nx"],
"extends": ["plugin:storybook/recommended"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"no-restricted-imports": ["error", "create-nx-workspace"],
"@typescript-eslint/no-restricted-imports": [
"error",
{
"patterns": [
{
"group": ["nx/src/plugins/js*"],
"message": "Imports from 'nx/src/plugins/js' are not allowed. Use '@nx/js' instead"
},
{
"group": ["**/native-bindings", "**/native-bindings.js", ""],
"message": "Direct imports from native-bindings.js are not allowed. Import from index.js instead."
}
]
}
],
"storybook/no-uninstalled-addons": [
"error",
{
"ignore": ["@nx/react/plugins/storybook"],
"packageJsonLocation": "../../package.json"
}
]
},
"overrides": [
{
"files": ["*.json"],
"parser": "jsonc-eslint-parser",
"rules": {}
},
{
"files": ["**/executors/**/schema.json", "**/generators/**/schema.json"],
"rules": {
"@nx/workspace/valid-schema-description": "error"
}
},
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"checkDynamicDependenciesExceptions": [".*"],
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
"root": true,
"parser": "@typescript-eslint/parser",
"env": {
"node": true
},
"ignorePatterns": ["**/*.ts"],
"plugins": ["@typescript-eslint", "@nx"],
"extends": ["plugin:storybook/recommended"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"no-restricted-imports": ["error", "create-nx-workspace"],
"@typescript-eslint/no-restricted-imports": [
"error",
{
"patterns": [
{
"group": ["nx/src/plugins/js*"],
"message": "Imports from 'nx/src/plugins/js' are not allowed. Use '@nx/js' instead"
},
{
"group": ["**/native-bindings", "**/native-bindings.js", ""],
"message": "Direct imports from native-bindings.js are not allowed. Import from index.js instead."
}
]
}
]
}
],
"storybook/no-uninstalled-addons": [
"error",
{
"ignore": ["@nx/react/plugins/storybook"],
"packageJsonLocation": "../../package.json"
}
]
},
"overrides": [
{
"files": ["*.json"],
"parser": "jsonc-eslint-parser",
"rules": {}
},
{
"files": [
"**/executors/**/schema.json",
"**/generators/**/schema.json"
],
"rules": {
"@nx/workspace/valid-schema-description": "error"
}
},
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"checkDynamicDependenciesExceptions": [".*"],
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
}
}
]
]
}
+50 -50
View File
@@ -1,57 +1,57 @@
launch-templates:
linux-medium:
resource-class: 'docker_linux_amd64/medium+'
image: 'ubuntu22.04-node20.11-v3'
env:
GIT_AUTHOR_EMAIL: test@test.com
GIT_AUTHOR_NAME: Test
GIT_COMMITTER_EMAIL: test@test.com
GIT_COMMITTER_NAME: Test
SELECTED_PM: 'pnpm'
NPM_CONFIG_PREFIX: '/home/workflows/.npm-global'
init-steps:
- name: Checkout
uses: 'nrwl/nx-cloud-workflows/v3.6/workflow-steps/checkout/main.yaml'
- name: Cache restore
uses: 'nrwl/nx-cloud-workflows/v3.6/workflow-steps/cache/main.yaml'
env:
KEY: 'pnpm-lock.yaml'
PATHS: |
node_modules
~/.cache/Cypress
~/.cache/ms-playwright
~/.pnpm-store
BASE_BRANCH: 'master'
- name: Install e2e deps
script: |
sudo apt-get update
sudo apt-get install -y ca-certificates lsof libvips-dev libglib2.0-dev libgirepository1.0-dev
- name: Install Pnpm
script: |
npm install -g pnpm@8
linux-medium:
resource-class: 'docker_linux_amd64/medium+'
image: 'ubuntu22.04-node20.11-v3'
env:
GIT_AUTHOR_EMAIL: test@test.com
GIT_AUTHOR_NAME: Test
GIT_COMMITTER_EMAIL: test@test.com
GIT_COMMITTER_NAME: Test
SELECTED_PM: 'pnpm'
NPM_CONFIG_PREFIX: '/home/workflows/.npm-global'
init-steps:
- name: Checkout
uses: 'nrwl/nx-cloud-workflows/v3.6/workflow-steps/checkout/main.yaml'
- name: Cache restore
uses: 'nrwl/nx-cloud-workflows/v3.6/workflow-steps/cache/main.yaml'
env:
KEY: 'pnpm-lock.yaml'
PATHS: |
node_modules
~/.cache/Cypress
~/.cache/ms-playwright
~/.pnpm-store
BASE_BRANCH: 'master'
- name: Install e2e deps
script: |
sudo apt-get update
sudo apt-get install -y ca-certificates lsof libvips-dev libglib2.0-dev libgirepository1.0-dev
- name: Install Pnpm
script: |
npm install -g pnpm@8
- name: Pnpm Install
script: |
pnpm install --frozen-lockfile
- name: Pnpm Install
script: |
pnpm install --frozen-lockfile
- name: Install Browsers
script: |
pnpm exec cypress install
pnpm exec playwright install
- name: Install Browsers
script: |
pnpm exec cypress install
pnpm exec playwright install
- name: Install Rust
script: |
curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh -s -- -y
source "$HOME/.cargo/env"
rustup toolchain install 1.70.0
- name: Install Rust
script: |
curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh -s -- -y
source "$HOME/.cargo/env"
rustup toolchain install 1.70.0
- name: Configure git metadata (needed for lerna smoke tests)
script: |
git config --global user.email test@test.com
git config --global user.name "Test Test"
- name: Configure git metadata (needed for lerna smoke tests)
script: |
git config --global user.email test@test.com
git config --global user.name "Test Test"
- name: Load Cargo Env
script: echo "PATH=$HOME/.cargo/bin:$PATH" >> $NX_CLOUD_ENV
- name: Load Cargo Env
script: echo "PATH=$HOME/.cargo/bin:$PATH" >> $NX_CLOUD_ENV
- name: Install zip and unzip
script: sudo apt-get -yqq install zip unzip
- name: Install zip and unzip
script: sudo apt-get -yqq install zip unzip
+3 -3
View File
@@ -1,4 +1,4 @@
distribute-on:
small-changeset: 8 linux-medium
medium-changeset: 10 linux-medium
large-changeset: 12 linux-medium
small-changeset: 8 linux-medium
medium-changeset: 10 linux-medium
large-changeset: 12 linux-medium
+4 -3
View File
@@ -1,5 +1,6 @@
{
"singleQuote": true,
"endOfLine": "lf",
"plugins": ["prettier-plugin-tailwindcss"]
"singleQuote": true,
"endOfLine": "lf",
"plugins": ["prettier-plugin-tailwindcss"],
"tabWidth": 3
}
+31 -31
View File
@@ -2,47 +2,47 @@
storage: ../build/local-registry/storage
auth:
htpasswd:
file: ./htpasswd
htpasswd:
file: ./htpasswd
# a list of other known repositories we can talk to
uplinks:
npmjs:
url: https://registry.npmjs.org/
maxage: 60m
max_fails: 20
fail_timeout: 2m
yarn:
url: https://registry.yarnpkg.com
maxage: 60m
max_fails: 20
fail_timeout: 2m
npmjs:
url: https://registry.npmjs.org/
maxage: 60m
max_fails: 20
fail_timeout: 2m
yarn:
url: https://registry.yarnpkg.com
maxage: 60m
max_fails: 20
fail_timeout: 2m
packages:
'@*/*':
# scoped packages
access: $all
publish: $all
unpublish: $all
proxy: npmjs
'@*/*':
# scoped packages
access: $all
publish: $all
unpublish: $all
proxy: npmjs
'**':
# allow all users (including non-authenticated users) to read and
# publish all packages
access: $all
'**':
# allow all users (including non-authenticated users) to read and
# publish all packages
access: $all
# allow all users (including non-authenticated users) to publish/publish packages
publish: $all
unpublish: $all
# allow all users (including non-authenticated users) to publish/publish packages
publish: $all
unpublish: $all
# if package is not available locally, proxy requests to 'yarn' registry
proxy: npmjs
# if package is not available locally, proxy requests to 'yarn' registry
proxy: npmjs
# log settings
logs:
type: stdout
format: pretty
level: warn
type: stdout
format: pretty
level: warn
publish:
allow_offline: true # set offline to true to allow publish offline
allow_offline: true # set offline to true to allow publish offline
+92 -92
View File
@@ -27,13 +27,13 @@ can [submit a Pull Request](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.
Source code and documentation are included in the top-level folders listed below.
- `docs` - Markdown and configuration files for documentation including tutorials, guides for each supported platform,
and API docs.
- `e2e` - E2E tests.
- `packages` - Source code for Nx packages such as Angular, React, Web, NestJS, Next and others including generators and
executors (or builders).
- `scripts` - Miscellaneous scripts for project tasks such as building documentation, testing, and code formatting.
- `tmp` - Folder used by e2e tests. If you are a WebStorm user, make sure to mark this folder as excluded.
- `docs` - Markdown and configuration files for documentation including tutorials, guides for each supported platform,
and API docs.
- `e2e` - E2E tests.
- `packages` - Source code for Nx packages such as Angular, React, Web, NestJS, Next and others including generators and
executors (or builders).
- `scripts` - Miscellaneous scripts for project tasks such as building documentation, testing, and code formatting.
- `tmp` - Folder used by e2e tests. If you are a WebStorm user, make sure to mark this folder as excluded.
## Development Workstation Setup
@@ -41,9 +41,9 @@ If you are using `VSCode`, and provided you have [Docker](https://docker.com) in
To do so, simply:
- Checkout the repo
- Open it with VSCode
- Open the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) and select "Dev Containers: Open Folder in Container..."
- Checkout the repo
- Open it with VSCode
- Open the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) and select "Dev Containers: Open Folder in Container..."
The repo comes with a preconfigured `devcontainer.json` file (located in `.devcontainer/` folder at root), that `VSCode` will automatically use to install the aforementioned tools, inside a Docker image. It will even run `pnpm install` for you, so you can start contributing to Nx right after.
@@ -73,12 +73,12 @@ it can be useful to publish to a local registry.
Check out [this video for a live walkthrough](https://youtu.be/Tx257WpNsxc) or follow the instructions below:
- Run `pnpm local-registry` in Terminal 1 (keep it running)
- Run `npm adduser --registry http://localhost:4873` in Terminal 2 (real credentials are not required, you just need to
be logged in. You can use test/test/test@test.io.)
- Run `pnpm nx-release 20.0.0 --local` in Terminal 2 - you can choose any nonexistent version number here, but it's recommended to use the next major
- Run `cd ./tmp` in Terminal 2
- Run `npx create-nx-workspace@20.0.0` in Terminal 2
- Run `pnpm local-registry` in Terminal 1 (keep it running)
- Run `npm adduser --registry http://localhost:4873` in Terminal 2 (real credentials are not required, you just need to
be logged in. You can use test/test/test@test.io.)
- Run `pnpm nx-release 20.0.0 --local` in Terminal 2 - you can choose any nonexistent version number here, but it's recommended to use the next major
- Run `cd ./tmp` in Terminal 2
- Run `npx create-nx-workspace@20.0.0` in Terminal 2
If you have problems publishing, make sure you use Node 18 and NPM 8.
@@ -88,33 +88,33 @@ If you have problems publishing, make sure you use Node 18 and NPM 8.
Yarn Berry operates slightly differently than Yarn Classic. In order to publish packages for Berry follow next steps:
- Run `yarn set version berry` to switch to latest Yarn version.
- Create `.yarnrc.yml` in root with following contents:
- Run `yarn set version berry` to switch to latest Yarn version.
- Create `.yarnrc.yml` in root with following contents:
```yml
nodeLinker: node-modules
npmRegistryServer: 'http://localhost:4873'
unsafeHttpWhitelist:
- localhost
```
```yml
nodeLinker: node-modules
npmRegistryServer: 'http://localhost:4873'
unsafeHttpWhitelist:
- localhost
```
- Run `pnpm local-registry` in Terminal 1 (keep it running)
- If you are creating nx workspace outside of your nx repo, make sure to add npm registry info to your root yarnrc (
usually in ~/.yarnrc.yml). The file should look something like this:
- Run `pnpm local-registry` in Terminal 1 (keep it running)
- If you are creating nx workspace outside of your nx repo, make sure to add npm registry info to your root yarnrc (
usually in ~/.yarnrc.yml). The file should look something like this:
```yml
npmRegistries:
'https://registry.yarnpkg.com':
npmAuthToken: npm_******************
yarnPath: .yarn/releases/yarn-3.2.2.cjs
npmRegistryServer: 'http://localhost:4873'
unsafeHttpWhitelist:
- localhost
```
```yml
npmRegistries:
'https://registry.yarnpkg.com':
npmAuthToken: npm_******************
yarnPath: .yarn/releases/yarn-3.2.2.cjs
npmRegistryServer: 'http://localhost:4873'
unsafeHttpWhitelist:
- localhost
```
- Run `pnpm nx-release minor --local` in Terminal 2 to publish next minor version. The output will report the version of published packages.
- Go to your target folder (e.g. `cd ./tmp`) in Terminal 2
- Run `yarn dlx create-nx-workspace@123.4.5` in Terminal 2 (replace `123.4.5` with the version that got published).
- Run `pnpm nx-release minor --local` in Terminal 2 to publish next minor version. The output will report the version of published packages.
- Go to your target folder (e.g. `cd ./tmp`) in Terminal 2
- Run `yarn dlx create-nx-workspace@123.4.5` in Terminal 2 (replace `123.4.5` with the version that got published).
### Running Unit Tests
@@ -158,9 +158,9 @@ The above command sets verbose logging (this exposes stack traces and underlying
To build Nx on Windows, you need to use WSL.
- Run `pnpm install` in WSL. Yarn will compile several dependencies. If you don't run `install` in WSL, they will be
compiled for Windows.
- Run `nx affected --target=test` and other commands in WSL.
- Run `pnpm install` in WSL. Yarn will compile several dependencies. If you don't run `install` in WSL, they will be
compiled for Windows.
- Run `nx affected --target=test` and other commands in WSL.
## Documentation Contributions
@@ -247,9 +247,9 @@ We want to fix all the issues as soon as possible, but before fixing a bug we ne
reproducible scenario gives us wealth of important information without going back and forth with you requiring
additional information, such as:
- the output of `nx report`
- `yarn.lock` or `package-lock.json` or `pnpm-lock.yaml`
- and most importantly - a use-case that fails
- the output of `nx report`
- `yarn.lock` or `package-lock.json` or `pnpm-lock.yaml`
- and most importantly - a use-case that fails
A minimal reproduction allows us to quickly confirm a bug (or point out a coding problem) as well as confirm that we are
fixing the right problem.
@@ -265,18 +265,18 @@ You can file new issues by filling out our [issue form](https://github.com/nrwl/
Please follow the following guidelines:
- Make sure unit tests pass (`nx affected --target=test`)
- Target a specific project with: `nx run proj:test` (i.e. `nx run angular:test` to target `packages/angular`)
- Target a specific unit test file (i.e. `packages/angular/src/utils/ast-command-line-utils.spec.ts`)
with `npx jest angular/src/utils/ast-utils` or `npx jest packages/angular/src/utils/ast-utils`
- For more options on running tests - check `npx jest --help` or visit [jestjs.io](https://jestjs.io/)
- Debug with `node --inspect-brk ./node_modules/jest/bin/jest.js build/packages/angular/src/utils/ast-utils.spec.js`
- Make sure e2e tests pass (this can take a while, so you can always let CI check those) (`nx affected --target=e2e`)
- Target a specific e2e test with `nx e2e e2e-cypress`
- Make sure you run `nx format`
- Update documentation with `pnpm documentation`. For documentation, check for spelling and grammatical errors.
- Update your commit message to follow the guidelines below (use `pnpm commit` to automate compliance)
- `pnpm check-commit` will check to make sure your commit messages are formatted correctly
- Make sure unit tests pass (`nx affected --target=test`)
- Target a specific project with: `nx run proj:test` (i.e. `nx run angular:test` to target `packages/angular`)
- Target a specific unit test file (i.e. `packages/angular/src/utils/ast-command-line-utils.spec.ts`)
with `npx jest angular/src/utils/ast-utils` or `npx jest packages/angular/src/utils/ast-utils`
- For more options on running tests - check `npx jest --help` or visit [jestjs.io](https://jestjs.io/)
- Debug with `node --inspect-brk ./node_modules/jest/bin/jest.js build/packages/angular/src/utils/ast-utils.spec.js`
- Make sure e2e tests pass (this can take a while, so you can always let CI check those) (`nx affected --target=e2e`)
- Target a specific e2e test with `nx e2e e2e-cypress`
- Make sure you run `nx format`
- Update documentation with `pnpm documentation`. For documentation, check for spelling and grammatical errors.
- Update your commit message to follow the guidelines below (use `pnpm commit` to automate compliance)
- `pnpm check-commit` will check to make sure your commit messages are formatted correctly
#### Commit Message Guidelines
@@ -292,46 +292,46 @@ body
The type must be one of the following:
- feat - New or improved behavior being introduced (e.g. Updating to new versions of React or Jest which bring in new
features)
- fix - Fixes the current unexpected behavior to match expected behavior (e.g. Fixing the library generator to create
the proper named project)
- cleanup - Code Style changes that have little to no effect on the user (e.g. Refactoring some functions into a
different file)
- docs - Changes to the documentation (e.g. Adding more details into the getting started guide)
- chore - Changes that have absolutely no effect on users (e.g. Updating the version of Nx used to build the repo)
- feat - New or improved behavior being introduced (e.g. Updating to new versions of React or Jest which bring in new
features)
- fix - Fixes the current unexpected behavior to match expected behavior (e.g. Fixing the library generator to create
the proper named project)
- cleanup - Code Style changes that have little to no effect on the user (e.g. Refactoring some functions into a
different file)
- docs - Changes to the documentation (e.g. Adding more details into the getting started guide)
- chore - Changes that have absolutely no effect on users (e.g. Updating the version of Nx used to build the repo)
##### Scope
The scope must be one of the following:
- angular - anything Angular specific
- bundling - anything bundling specific (e.g. rollup, webpack, etc.)
- core - anything Nx core specific
- detox - anything Detox specific
- devkit - devkit-related changes
- graph - anything graph app specific
- expo - anything Expo specific
- express - anything Express specific
- js - anything related to @nx/js package or general js/ts support
- linter - anything Linter specific
- nest - anything Nest specific
- nextjs - anything Next specific
- node - anything Node specific
- nx-cloud - anything Nx Cloud specific
- nx-plugin - anything Nx Plugin specific
- nx-dev - anything related to docs infrastructure
- react - anything React specific
- react-native - anything React Native specific
- release - anything related to nx release
- repo - anything related to managing the Nx repo itself
- storybook - anything Storybook specific
- testing - anything testing specific (e.g., Jest or Cypress)
- vite - anything Vite specific
- vue - anything Vue specific
- web - anything Web specific
- webpack - anything Webpack specific
- misc - misc stuff
- angular - anything Angular specific
- bundling - anything bundling specific (e.g. rollup, webpack, etc.)
- core - anything Nx core specific
- detox - anything Detox specific
- devkit - devkit-related changes
- graph - anything graph app specific
- expo - anything Expo specific
- express - anything Express specific
- js - anything related to @nx/js package or general js/ts support
- linter - anything Linter specific
- nest - anything Nest specific
- nextjs - anything Next specific
- node - anything Node specific
- nx-cloud - anything Nx Cloud specific
- nx-plugin - anything Nx Plugin specific
- nx-dev - anything related to docs infrastructure
- react - anything React specific
- react-native - anything React Native specific
- release - anything related to nx release
- repo - anything related to managing the Nx repo itself
- storybook - anything Storybook specific
- testing - anything testing specific (e.g., Jest or Cypress)
- vite - anything Vite specific
- vue - anything Vue specific
- web - anything Web specific
- webpack - anything Webpack specific
- misc - misc stuff
##### Subject and Body
+9 -9
View File
@@ -25,21 +25,21 @@ Nx is a build system with built-in tooling and advanced CI capabilities. It help
A few links to help you get started:
- [Nx.Dev: Documentation, Guides, Interactive Tutorials](https://nx.dev)
- [Nx.Dev: Core Tutorials](https://nx.dev/getting-started/intro)
- [Recipe: Adding Nx to an Existing Monorepo](https://nx.dev/recipes/adopting-nx/adding-to-monorepo)
- [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
- [Blog Posts About Nx](https://nx.dev/blog)
- [Nx.Dev: Documentation, Guides, Interactive Tutorials](https://nx.dev)
- [Nx.Dev: Core Tutorials](https://nx.dev/getting-started/intro)
- [Recipe: Adding Nx to an Existing Monorepo](https://nx.dev/recipes/adopting-nx/adding-to-monorepo)
- [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
- [Blog Posts About Nx](https://nx.dev/blog)
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="./images/nx-courses-and-videos.svg"
width="100%" alt="Nx - Smart Monorepos · Fast CI"></a></p>
# Engage with the Core Team and the Community
- [Nx.Dev Community Page: Community Discord Channel, Newsletter, etc.](https://nx.dev/community)
- [The Nx Show Playlist on YouTube](https://www.youtube.com/playlist?list=PLakNactNC1dE8KLQ5zd3fQwu_yQHjTmR5). It's a
regular YouTube stream where we talk all things Nx. Join the stream, ask questions, etc.
- [Follow Nx on Twitter](https://twitter.com/NxDevTools)
- [Nx.Dev Community Page: Community Discord Channel, Newsletter, etc.](https://nx.dev/community)
- [The Nx Show Playlist on YouTube](https://www.youtube.com/playlist?list=PLakNactNC1dE8KLQ5zd3fQwu_yQHjTmR5). It's a
regular YouTube stream where we talk all things Nx. Join the stream, ask questions, etc.
- [Follow Nx on Twitter](https://twitter.com/NxDevTools)
## Want to help?
+1 -1
View File
@@ -1,3 +1,3 @@
{
"babelrcRoots": ["*"]
"babelrcRoots": ["*"]
}
+490 -490
View File
@@ -1,492 +1,492 @@
[
{
"name": "@ahryman40k/nx-vitepress",
"description": "Nx plugin add vitepress project to your workspace",
"url": "https://github.com/Ahryman40k/nx-vitepress/tree/main/packages/nx-vitepress"
},
{
"name": "@nightwatch/nx",
"description": "The NightwatchJS plugin allows your workspace to use the power of NightwatchJS for E2E and Component Testing on Desktop and Mobile",
"url": "https://github.com/nightwatchjs/nightwatch-plugin-nx/"
},
{
"name": "@nxkit/playwright",
"description": "The Playwright plugin allows your workspace to use the power of Playwright end-to-end testing",
"url": "https://github.com/nxkit/nxkit"
},
{
"name": "qwik-nx",
"description": "Get first class support for Qwik inside of Nx monorepos with Qwik optimized custom executors, generators and a vite plugin",
"url": "https://github.com/qwikifiers/qwik-nx"
},
{
"name": "@nxkit/style-dictionary",
"description": "Nx plugin to generate and build Style Dictionary projects inside your Nx workspace",
"url": "https://github.com/nxkit/nxkit"
},
{
"name": "nx-plugin-vite",
"description": "Nx plugin integrations with Vite.",
"url": "https://nx-plugins.netlify.app/"
},
{
"name": "nx-serverless-cdk",
"description": "Create CDK applications and construct libraries. Test and debug infrastructure code and AWS Lambda functions locally.",
"url": "https://github.com/castleadmin/nx-plugins/tree/main/nx-serverless-cdk/plugin"
},
{
"name": "@ago-dev/nx-aws-cdk-v2",
"description": "An nx plugin for the aws-cdk v2.",
"url": "https://github.com/adrian-goe/nx-aws-cdk-v2"
},
{
"name": "@berenddeboer/nx-aws-cdk",
"description": "Nx plugin to generate a CDK stack with support for the vitest runner. Supports all CDK commands.",
"url": "https://github.com/berenddeboer/nx-plugins/tree/main/packages/nx-aws-cdk"
},
{
"name": "@nx-iac/aws-cdk",
"description": "Empowers your Nx workspace with AWS CDK capabilities ⚡",
"url": "https://github.com/joelklint/nx-aws-cdk"
},
{
"name": "@routineless/nx-aws-cdk",
"description": "Nx plugin to generate and manage aws cdk app and lambdas.",
"url": "https://github.com/KozelAnatoliy/routineless/tree/main/packages/nx-aws-cdk"
},
{
"name": "@berenddeboer/nx-sst",
"description": "Nx plugin to generate an SST stack and execute all SST commands.",
"url": "https://github.com/berenddeboer/nx-plugins/tree/main/packages/nx-sst"
},
{
"name": "@rxap/plugin-localazy",
"description": "An Nx plugin for localazy.com upload and download tasks.",
"url": "https://gitlab.com/rxap/plugins/-/tree/master/libs/localazy"
},
{
"name": "nx-electron",
"description": "An Nx plugin for developing Electron applications",
"url": "https://github.com/bennymeg/nx-electron"
},
{
"name": "nx-stylelint",
"description": "Nx plugin to use stylelint in a nx workspace",
"url": "https://github.com/Phillip9587/nx-stylelint"
},
{
"name": "@nxext/ionic-react",
"description": "An Nx plugin for developing Ionic React applications and libraries",
"url": "https://github.com/nxext/nx-extensions-ionic/tree/main/packages/ionic-react"
},
{
"name": "@nxext/ionic-angular",
"description": "An Nx plugin for developing Ionic Angular applications and libraries",
"url": "https://github.com/nxext/nx-extensions-ionic/tree/main/packages/ionic-angular"
},
{
"name": "@nxext/capacitor",
"description": "An Nx plugin for developing cross-platform applications using Capacitor",
"url": "https://github.com/nxext/nx-extensions/tree/main/packages/capacitor"
},
{
"name": "@angular-architects/ddd",
"description": "Nx plugin for structuring a monorepo with domains and layers",
"url": "https://github.com/angular-architects/nx-ddd-plugin"
},
{
"name": "@flowaccount/nx-serverless",
"description": "Nx plugin for node/angular-universal schematics and deployment builders in an Nx workspace",
"url": "https://github.com/flowaccount/nx-plugins"
},
{
"name": "@ns3/nx-serverless",
"description": "Nx plugin for node serverless applications in an Nx workspace",
"url": "https://github.com/Bielik20/nx-plugins/tree/master/packages/nx-serverless"
},
{
"name": "@ns3/nx-jest-playwright",
"description": "Nx plugin to run jest-playwright e2e tests in an Nx workspace",
"url": "https://github.com/Bielik20/nx-plugins/tree/master/packages/nx-jest-playwright"
},
{
"name": "@ns3/nx-playwright",
"description": "Nx plugin to run playwright e2e tests in an Nx workspace",
"url": "https://github.com/Bielik20/nx-plugins/tree/master/packages/nx-playwright"
},
{
"name": "@nx-plus/nuxt",
"description": "Nx plugin adding first class support for Nuxt in your Nx workspace.",
"url": "https://github.com/ZachJW34/nx-plus/tree/master/libs/nuxt"
},
{
"name": "@nx-plus/vue",
"description": "Nx plugin adding first class support for Vue in your Nx workspace.",
"url": "https://github.com/ZachJW34/nx-plus/tree/master/libs/vue"
},
{
"name": "@nx-plus/docusaurus",
"description": "Nx plugin adding first class support for Docusaurus in your Nx workspace.",
"url": "https://github.com/ZachJW34/nx-plus/tree/master/libs/docusaurus"
},
{
"name": "@twittwer/compodoc",
"description": "Nx Plugin to integrate the generation of documentation with Compodoc in the Nx workflow",
"url": "https://github.com/twittwer/nx-tools/tree/master/libs/compodoc#readme"
},
{
"name": "@enio.ai/nx-install",
"description": "nx-install is a plugin for Nx workspaces to quickly setup custom install commands via npm.",
"url": "https://github.com/enio-ireland/enio/tree/develop/packages/nx-install#readme"
},
{
"name": "@enio.ai/typedoc",
"description": "typedoc is a plugin for Nx workspaces to quickly setup documentation automation on your projects using typedoc.",
"url": "https://github.com/enio-ireland/enio/tree/develop/packages/typedoc#readme"
},
{
"name": "@nxext/svelte",
"description": "Nx plugin to use Svelte within nx workspaces",
"url": "https://github.com/nxext/nx-extensions/tree/master/packages/svelte"
},
{
"name": "@nxext/stencil",
"description": "Nx plugin to use StencilJs within nx workspaces",
"url": "https://github.com/nxext/nx-extensions/tree/master/packages/stencil"
},
{
"name": "@nxext/vue",
"description": "Nx plugin to use VueJS 3 within nx workspaces",
"url": "https://github.com/nxext/nx-extensions/tree/master/packages/vue"
},
{
"name": "@nxext/solid",
"description": "Nx plugin to use SolidJS within nx workspaces",
"url": "https://github.com/nxext/nx-extensions/tree/master/packages/solid"
},
{
"name": "@nx-go/nx-go",
"description": "Nx plugin to use Go in a Nx workspace",
"url": "https://github.com/nx-go/nx-go"
},
{
"name": "@nx-golang/gin",
"description": "Nx plugin to use Go-Gin in a Nx workspace",
"url": "https://github.com/nx-golang/nx-golang"
},
{
"name": "@angular-architects/module-federation",
"description": "Nx plugin to use webpack module federation",
"url": "https://github.com/angular-architects/module-federation-plugin"
},
{
"name": "@nxrocks/nx-spring-boot",
"description": "Nx plugin to generate, run, package, build (and more) Spring Boot projects inside your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-spring-boot"
},
{
"name": "@trumbitta/nx-plugin-openapi",
"description": "OpenAPI Plugin for Nx. Keep your API spec files in libs, and auto-generate sources.",
"url": "https://github.com/trumbitta/nx-trumbitta/tree/main/packages/nx-plugin-openapi"
},
{
"name": "@trumbitta/nx-plugin-unused-deps",
"description": "Check the dependency graph of your monorepo, looking for unused NPM packages.",
"url": "https://github.com/trumbitta/nx-trumbitta/tree/main/packages/nx-plugin-unused-deps"
},
{
"name": "@nxrocks/nx-flutter",
"description": "Nx Plugin adding first class support for Flutter in your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-flutter"
},
{
"name": "@srleecode/domain",
"description": "Nx Plugin for allowing operations to occur at the domain level instead of the default library level",
"url": "https://github.com/srlee309/domain"
},
{
"name": "@jscutlery/semver",
"description": "Nx plugin to automate semantic versioning and CHANGELOG generation.",
"url": "https://github.com/jscutlery/semver"
},
{
"name": "ngx-deploy-npm",
"description": "Publish your libraries to NPM with just one command.",
"url": "https://github.com/bikecoders/ngx-deploy-npm"
},
{
"name": "@nx-dotnet/core",
"description": "Nx plugin for developing and housing .NET projects within an Nx workspace.",
"url": "https://github.com/nx-dotnet/nx-dotnet"
},
{
"name": "@nxrocks/nx-quarkus",
"description": "Nx plugin to generate, run, package, build (and more) Quarkus projects inside your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-quarkus"
},
{
"name": "@nx-extend/gcp-secrets",
"description": "Nx plugin to generate and securely deploy your Google Cloud Secrets",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/gcp-secrets"
},
{
"name": "@nx-extend/gcp-storage",
"description": "Nx plugin to upload to Google Cloud Storage",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/gcp-storage"
},
{
"name": "@nx-extend/gcp-functions",
"description": "Nx plugin to generate, run, build and deploy your Google Cloud Functions",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/gcp-functions"
},
{
"name": "@nx-extend/gcp-deployment-manager",
"description": "Nx plugin to deploy your Google Cloud Deployments",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/gcp-deployment-manager"
},
{
"name": "@nx-extend/gcp-cloud-run",
"description": "Nx plugin to build and deploy your docker container to Google Cloud Run",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/gcp-cloud-run"
},
{
"name": "@nx-extend/translations",
"description": "Nx plugin to extract, pull, push and translate your apps translations",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/translations"
},
{
"name": "@nx-extend/firebase-hosting",
"description": "Nx plugin to deploy your apps to Firebase hosting",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/firebase-hosting"
},
{
"name": "@nx-extend/e2e-runner",
"description": "Nx plugin that can start your API before running Cypress/Playwright",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/e2e-runner"
},
{
"name": "@nx-extend/vercel",
"description": "Nx plugin to deploy your apps to Vercel",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/vercel"
},
{
"name": "@nx-extend/strapi",
"description": "Nx plugin for developing Strapi applications",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/strapi"
},
{
"name": "@nx-extend/playwright",
"description": "Nx plugin to run playwright e2e tests in an Nx workspace",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/playwright"
},
{
"name": "@nx-extend/terraform",
"description": "Nx plugin for deploying your resources with Terraform",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/terraform"
},
{
"name": "@nx-extend/pulumi",
"description": "Nx plugin for deploying your resources with Pulumi",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/pulumi"
},
{
"name": "@nx-extend/react-email",
"description": "Nx plugin for developing email templates with react.email",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/react-email"
},
{
"name": "@nx-extend/shadcn-ui",
"description": "Nx plugin for working with shadcn/ui",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/shadcn-ui"
},
{
"name": "@nx-extend/docusaurus",
"description": "Nx plugin adding first class support for Docusaurus in your Nx workspace.",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/docusaurus"
},
{
"name": "@nativescript/nx",
"description": "Nx Plugin adding first class support for NativeScript in your Nx workspace",
"url": "https://github.com/nativescript/nx"
},
{
"name": "@nxtensions/astro",
"description": "Nx plugin adding first class support for Astro (https://astro.build).",
"url": "https://github.com/nxtensions/nxtensions/tree/main/packages/astro"
},
{
"name": "@nxrs/cargo",
"description": "Nx plugin adding first-class support for Rust applications and libraries.",
"url": "https://github.com/nxrs/cargo/tree/main/packages/cargo"
},
{
"name": "nx-uvu",
"description": "An nx executor for the uvu test library",
"url": "https://github.com/jmcdo29/nx-uvu"
},
{
"name": "@ndrsg/nx-http",
"description": "Plugin with executors, which can perform http-stuff (e.g. requests, webhooks, file up/downloads, ...)",
"url": "https://github.com/ndrsg/nx-ext/tree/main/packages/nx-http"
},
{
"name": "@diogovcs/graphql-mesh",
"description": "Nx plugin to add GraphQL Mesh integration to Nx Workspace.",
"url": "https://github.com/DiogoVCS/nx-workspace-plugins"
},
{
"name": "@computas/nx-yarn",
"description": "A plugin to help make nx with yarn a pleasant experience.",
"url": "https://github.com/computas/nx-yarn"
},
{
"name": "@theunderscorer/nx-semantic-release",
"description": "Nx plugin for automated releases using semantic-release.",
"url": "https://github.com/TheUnderScorer/nx-semantic-release"
},
{
"name": "nx-pwm",
"description": "Nx plugin and CLI to help maintain packages, inspired by NX repo tooling",
"url": "https://github.com/gioragutt/nx-pwm"
},
{
"name": "@nxrocks/nx-micronaut",
"description": "Nx plugin to generate, run, package, build (and more) Micronaut projects inside your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-micronaut"
},
{
"name": "@koliveira15/nx-sonarqube",
"description": "Nx plugin that scans projects using SonarQube / SonarCloud.",
"url": "https://github.com/koliveira15/nx-sonarqube"
},
{
"name": "@mands/nx-playwright",
"description": "The Playwright plugin allows your workspace to use the power of Playwright end-to-end testing using a native runner.",
"url": "https://github.com/marksandspencer/nx-plugins/tree/main/packages/nx-playwright"
},
{
"name": "@diogovcs/stryker-mutator",
"description": "Nx plugin to add Stryker Mutator mutation tests to the Nx Workspace.",
"url": "https://github.com/DiogoVCS/nx-workspace-plugins"
},
{
"name": "@spaceribs/nx-web-ext",
"description": "Nx plugin that allows you to build, test and deploy web extensions.",
"url": "https://github.com/spaceribs/spaceribs/tree/main/packages/nx-web-ext"
},
{
"name": "@spaceribs/nx-betterer",
"description": "Nx plugin that applies betterer standards on a per-project basis.",
"url": "https://github.com/spaceribs/spaceribs/tree/main/packages/nx-betterer"
},
{
"name": "@nx-tools/nx-container",
"description": "Nx plugin to build OCI containers with Docker, Podman or Kaniko.",
"url": "https://github.com/gperdomor/nx-tools/tree/main/packages/nx-container"
},
{
"name": "@nxrocks/nx-melos",
"description": "Nx plugin adding first class support for Melos in your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-melos"
},
{
"name": "@monodon/rust",
"description": "Adds Cargo and Rust support",
"url": "https://github.com/cammisuli/monodon/tree/main/packages/rust"
},
{
"name": "nx-mesh",
"description": "GraphQL Mesh support for Nx",
"url": "https://github.com/domjtalbot/nx-mesh"
},
{
"name": "@nxazure/func",
"description": "Nx plugin to add Azure Functions support to Nx Workspace.",
"url": "https://github.com/AlexPshul/nxazure/tree/master/packages/func"
},
{
"name": "@rbnx/webdriverio",
"description": "A Nx plugin that adds the WebdriverIO testing framework to a NX workspace.",
"url": "https://github.com/Roozenboom/rbnx/tree/main/packages/webdriverio"
},
{
"name": "nx-ngrok",
"description": "Ngrok support for Nx",
"url": "https://github.com/domjtalbot/nx-ngrok"
},
{
"name": "@nxrocks/nx-ktor",
"description": "Nx plugin to generate, run, package, build (and more) Ktor projects inside your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-ktor"
},
{
"name": "nx-size-limit",
"description": "Adds size-limit support for Nx (performance budget tool for JavaScript)",
"url": "https://github.com/LironHazan/nx-size-limit"
},
{
"name": "@loft-orbital/terraform",
"description": "Terraform executors and generators",
"url": "https://github.com/loft-orbital/nx-plugins/tree/main/packages/terraform"
},
{
"name": "@nxlv/python",
"description": "Nx plugin designed to extend the Nx features to work with Python projects based on Poetry.",
"url": "https://github.com/lucasvieirasilva/nx-plugins/tree/main/packages/nx-python"
},
{
"name": "nx-gcp-cache",
"description": "Nx plugin to use Google Cloud Storage as distributed remote cache",
"url": "https://github.com/davidgarciab/nx-gcp-cache"
},
{
"name": "@jnxplus/nx-gradle",
"description": "Nx plugin to add Gradle multi-project builds support to Nx workspace",
"url": "https://github.com/khalilou88/jnxplus/tree/main/packages/nx-gradle"
},
{
"name": "@jnxplus/nx-maven",
"description": "Nx plugin to add Maven multi-module project support to Nx workspace",
"url": "https://github.com/khalilou88/jnxplus/tree/main/packages/nx-maven"
},
{
"name": "@naxodev/nx-cloudflare",
"description": "Nx plugin for Cloudflare, in particular Cloudflare workers. It allows to generate build and run Cloudflare workers in your Nx workspace.",
"url": "https://github.com/naxodev/oss/tree/main/packages/plugins/nx-cloudflare"
},
{
"name": "@ziacik/azure-func",
"description": "Generating, serving and publishing Azure Functions 4 apps.",
"url": "https://github.com/ziacik/nx-tools/tree/master/packages/azure-func"
},
{
"name": "@simondotm/nx-firebase",
"description": "Nx plugin to support Firebase Apps and Cloud Functions in Nx workspaces",
"url": "https://github.com/simondotm/nx-firebase"
},
{
"name": "@dman926/nx-python-pdm",
"description": "Use Python in NX workspaces with PDM",
"url": "https://github.com/dman926/nx-python-pdm"
},
{
"name": "@gnuechtel/nx-cucumber",
"description": "Plugin to use Cucumber within Nx workspaces",
"url": "https://gitlab.com/gnuechtel/open-source/-/tree/main/libs/nx-cucumber"
},
{
"name": "@analogjs/platform",
"description": "Official plugin to add Analog to your Nx monorepo.",
"url": "https://analogjs.org/docs/integrations/nx"
},
{
"name": "@getlarge/nx-heroku",
"description": "Plugin to deploy and promote Nx apps on Heroku",
"url": "https://github.com/getlarge/nx-heroku"
},
{
"name": "@huge-nx/conventions",
"description": "Plugin to generate and manage Nx workspaces by adhering to established workspace conventions.",
"url": "https://github.com/jogelin/huge-nx"
}
{
"name": "@ahryman40k/nx-vitepress",
"description": "Nx plugin add vitepress project to your workspace",
"url": "https://github.com/Ahryman40k/nx-vitepress/tree/main/packages/nx-vitepress"
},
{
"name": "@nightwatch/nx",
"description": "The NightwatchJS plugin allows your workspace to use the power of NightwatchJS for E2E and Component Testing on Desktop and Mobile",
"url": "https://github.com/nightwatchjs/nightwatch-plugin-nx/"
},
{
"name": "@nxkit/playwright",
"description": "The Playwright plugin allows your workspace to use the power of Playwright end-to-end testing",
"url": "https://github.com/nxkit/nxkit"
},
{
"name": "qwik-nx",
"description": "Get first class support for Qwik inside of Nx monorepos with Qwik optimized custom executors, generators and a vite plugin",
"url": "https://github.com/qwikifiers/qwik-nx"
},
{
"name": "@nxkit/style-dictionary",
"description": "Nx plugin to generate and build Style Dictionary projects inside your Nx workspace",
"url": "https://github.com/nxkit/nxkit"
},
{
"name": "nx-plugin-vite",
"description": "Nx plugin integrations with Vite.",
"url": "https://nx-plugins.netlify.app/"
},
{
"name": "nx-serverless-cdk",
"description": "Create CDK applications and construct libraries. Test and debug infrastructure code and AWS Lambda functions locally.",
"url": "https://github.com/castleadmin/nx-plugins/tree/main/nx-serverless-cdk/plugin"
},
{
"name": "@ago-dev/nx-aws-cdk-v2",
"description": "An nx plugin for the aws-cdk v2.",
"url": "https://github.com/adrian-goe/nx-aws-cdk-v2"
},
{
"name": "@berenddeboer/nx-aws-cdk",
"description": "Nx plugin to generate a CDK stack with support for the vitest runner. Supports all CDK commands.",
"url": "https://github.com/berenddeboer/nx-plugins/tree/main/packages/nx-aws-cdk"
},
{
"name": "@nx-iac/aws-cdk",
"description": "Empowers your Nx workspace with AWS CDK capabilities ⚡",
"url": "https://github.com/joelklint/nx-aws-cdk"
},
{
"name": "@routineless/nx-aws-cdk",
"description": "Nx plugin to generate and manage aws cdk app and lambdas.",
"url": "https://github.com/KozelAnatoliy/routineless/tree/main/packages/nx-aws-cdk"
},
{
"name": "@berenddeboer/nx-sst",
"description": "Nx plugin to generate an SST stack and execute all SST commands.",
"url": "https://github.com/berenddeboer/nx-plugins/tree/main/packages/nx-sst"
},
{
"name": "@rxap/plugin-localazy",
"description": "An Nx plugin for localazy.com upload and download tasks.",
"url": "https://gitlab.com/rxap/plugins/-/tree/master/libs/localazy"
},
{
"name": "nx-electron",
"description": "An Nx plugin for developing Electron applications",
"url": "https://github.com/bennymeg/nx-electron"
},
{
"name": "nx-stylelint",
"description": "Nx plugin to use stylelint in a nx workspace",
"url": "https://github.com/Phillip9587/nx-stylelint"
},
{
"name": "@nxext/ionic-react",
"description": "An Nx plugin for developing Ionic React applications and libraries",
"url": "https://github.com/nxext/nx-extensions-ionic/tree/main/packages/ionic-react"
},
{
"name": "@nxext/ionic-angular",
"description": "An Nx plugin for developing Ionic Angular applications and libraries",
"url": "https://github.com/nxext/nx-extensions-ionic/tree/main/packages/ionic-angular"
},
{
"name": "@nxext/capacitor",
"description": "An Nx plugin for developing cross-platform applications using Capacitor",
"url": "https://github.com/nxext/nx-extensions/tree/main/packages/capacitor"
},
{
"name": "@angular-architects/ddd",
"description": "Nx plugin for structuring a monorepo with domains and layers",
"url": "https://github.com/angular-architects/nx-ddd-plugin"
},
{
"name": "@flowaccount/nx-serverless",
"description": "Nx plugin for node/angular-universal schematics and deployment builders in an Nx workspace",
"url": "https://github.com/flowaccount/nx-plugins"
},
{
"name": "@ns3/nx-serverless",
"description": "Nx plugin for node serverless applications in an Nx workspace",
"url": "https://github.com/Bielik20/nx-plugins/tree/master/packages/nx-serverless"
},
{
"name": "@ns3/nx-jest-playwright",
"description": "Nx plugin to run jest-playwright e2e tests in an Nx workspace",
"url": "https://github.com/Bielik20/nx-plugins/tree/master/packages/nx-jest-playwright"
},
{
"name": "@ns3/nx-playwright",
"description": "Nx plugin to run playwright e2e tests in an Nx workspace",
"url": "https://github.com/Bielik20/nx-plugins/tree/master/packages/nx-playwright"
},
{
"name": "@nx-plus/nuxt",
"description": "Nx plugin adding first class support for Nuxt in your Nx workspace.",
"url": "https://github.com/ZachJW34/nx-plus/tree/master/libs/nuxt"
},
{
"name": "@nx-plus/vue",
"description": "Nx plugin adding first class support for Vue in your Nx workspace.",
"url": "https://github.com/ZachJW34/nx-plus/tree/master/libs/vue"
},
{
"name": "@nx-plus/docusaurus",
"description": "Nx plugin adding first class support for Docusaurus in your Nx workspace.",
"url": "https://github.com/ZachJW34/nx-plus/tree/master/libs/docusaurus"
},
{
"name": "@twittwer/compodoc",
"description": "Nx Plugin to integrate the generation of documentation with Compodoc in the Nx workflow",
"url": "https://github.com/twittwer/nx-tools/tree/master/libs/compodoc#readme"
},
{
"name": "@enio.ai/nx-install",
"description": "nx-install is a plugin for Nx workspaces to quickly setup custom install commands via npm.",
"url": "https://github.com/enio-ireland/enio/tree/develop/packages/nx-install#readme"
},
{
"name": "@enio.ai/typedoc",
"description": "typedoc is a plugin for Nx workspaces to quickly setup documentation automation on your projects using typedoc.",
"url": "https://github.com/enio-ireland/enio/tree/develop/packages/typedoc#readme"
},
{
"name": "@nxext/svelte",
"description": "Nx plugin to use Svelte within nx workspaces",
"url": "https://github.com/nxext/nx-extensions/tree/master/packages/svelte"
},
{
"name": "@nxext/stencil",
"description": "Nx plugin to use StencilJs within nx workspaces",
"url": "https://github.com/nxext/nx-extensions/tree/master/packages/stencil"
},
{
"name": "@nxext/vue",
"description": "Nx plugin to use VueJS 3 within nx workspaces",
"url": "https://github.com/nxext/nx-extensions/tree/master/packages/vue"
},
{
"name": "@nxext/solid",
"description": "Nx plugin to use SolidJS within nx workspaces",
"url": "https://github.com/nxext/nx-extensions/tree/master/packages/solid"
},
{
"name": "@nx-go/nx-go",
"description": "Nx plugin to use Go in a Nx workspace",
"url": "https://github.com/nx-go/nx-go"
},
{
"name": "@nx-golang/gin",
"description": "Nx plugin to use Go-Gin in a Nx workspace",
"url": "https://github.com/nx-golang/nx-golang"
},
{
"name": "@angular-architects/module-federation",
"description": "Nx plugin to use webpack module federation",
"url": "https://github.com/angular-architects/module-federation-plugin"
},
{
"name": "@nxrocks/nx-spring-boot",
"description": "Nx plugin to generate, run, package, build (and more) Spring Boot projects inside your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-spring-boot"
},
{
"name": "@trumbitta/nx-plugin-openapi",
"description": "OpenAPI Plugin for Nx. Keep your API spec files in libs, and auto-generate sources.",
"url": "https://github.com/trumbitta/nx-trumbitta/tree/main/packages/nx-plugin-openapi"
},
{
"name": "@trumbitta/nx-plugin-unused-deps",
"description": "Check the dependency graph of your monorepo, looking for unused NPM packages.",
"url": "https://github.com/trumbitta/nx-trumbitta/tree/main/packages/nx-plugin-unused-deps"
},
{
"name": "@nxrocks/nx-flutter",
"description": "Nx Plugin adding first class support for Flutter in your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-flutter"
},
{
"name": "@srleecode/domain",
"description": "Nx Plugin for allowing operations to occur at the domain level instead of the default library level",
"url": "https://github.com/srlee309/domain"
},
{
"name": "@jscutlery/semver",
"description": "Nx plugin to automate semantic versioning and CHANGELOG generation.",
"url": "https://github.com/jscutlery/semver"
},
{
"name": "ngx-deploy-npm",
"description": "Publish your libraries to NPM with just one command.",
"url": "https://github.com/bikecoders/ngx-deploy-npm"
},
{
"name": "@nx-dotnet/core",
"description": "Nx plugin for developing and housing .NET projects within an Nx workspace.",
"url": "https://github.com/nx-dotnet/nx-dotnet"
},
{
"name": "@nxrocks/nx-quarkus",
"description": "Nx plugin to generate, run, package, build (and more) Quarkus projects inside your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-quarkus"
},
{
"name": "@nx-extend/gcp-secrets",
"description": "Nx plugin to generate and securely deploy your Google Cloud Secrets",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/gcp-secrets"
},
{
"name": "@nx-extend/gcp-storage",
"description": "Nx plugin to upload to Google Cloud Storage",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/gcp-storage"
},
{
"name": "@nx-extend/gcp-functions",
"description": "Nx plugin to generate, run, build and deploy your Google Cloud Functions",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/gcp-functions"
},
{
"name": "@nx-extend/gcp-deployment-manager",
"description": "Nx plugin to deploy your Google Cloud Deployments",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/gcp-deployment-manager"
},
{
"name": "@nx-extend/gcp-cloud-run",
"description": "Nx plugin to build and deploy your docker container to Google Cloud Run",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/gcp-cloud-run"
},
{
"name": "@nx-extend/translations",
"description": "Nx plugin to extract, pull, push and translate your apps translations",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/translations"
},
{
"name": "@nx-extend/firebase-hosting",
"description": "Nx plugin to deploy your apps to Firebase hosting",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/firebase-hosting"
},
{
"name": "@nx-extend/e2e-runner",
"description": "Nx plugin that can start your API before running Cypress/Playwright",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/e2e-runner"
},
{
"name": "@nx-extend/vercel",
"description": "Nx plugin to deploy your apps to Vercel",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/vercel"
},
{
"name": "@nx-extend/strapi",
"description": "Nx plugin for developing Strapi applications",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/strapi"
},
{
"name": "@nx-extend/playwright",
"description": "Nx plugin to run playwright e2e tests in an Nx workspace",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/playwright"
},
{
"name": "@nx-extend/terraform",
"description": "Nx plugin for deploying your resources with Terraform",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/terraform"
},
{
"name": "@nx-extend/pulumi",
"description": "Nx plugin for deploying your resources with Pulumi",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/pulumi"
},
{
"name": "@nx-extend/react-email",
"description": "Nx plugin for developing email templates with react.email",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/react-email"
},
{
"name": "@nx-extend/shadcn-ui",
"description": "Nx plugin for working with shadcn/ui",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/shadcn-ui"
},
{
"name": "@nx-extend/docusaurus",
"description": "Nx plugin adding first class support for Docusaurus in your Nx workspace.",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/docusaurus"
},
{
"name": "@nativescript/nx",
"description": "Nx Plugin adding first class support for NativeScript in your Nx workspace",
"url": "https://github.com/nativescript/nx"
},
{
"name": "@nxtensions/astro",
"description": "Nx plugin adding first class support for Astro (https://astro.build).",
"url": "https://github.com/nxtensions/nxtensions/tree/main/packages/astro"
},
{
"name": "@nxrs/cargo",
"description": "Nx plugin adding first-class support for Rust applications and libraries.",
"url": "https://github.com/nxrs/cargo/tree/main/packages/cargo"
},
{
"name": "nx-uvu",
"description": "An nx executor for the uvu test library",
"url": "https://github.com/jmcdo29/nx-uvu"
},
{
"name": "@ndrsg/nx-http",
"description": "Plugin with executors, which can perform http-stuff (e.g. requests, webhooks, file up/downloads, ...)",
"url": "https://github.com/ndrsg/nx-ext/tree/main/packages/nx-http"
},
{
"name": "@diogovcs/graphql-mesh",
"description": "Nx plugin to add GraphQL Mesh integration to Nx Workspace.",
"url": "https://github.com/DiogoVCS/nx-workspace-plugins"
},
{
"name": "@computas/nx-yarn",
"description": "A plugin to help make nx with yarn a pleasant experience.",
"url": "https://github.com/computas/nx-yarn"
},
{
"name": "@theunderscorer/nx-semantic-release",
"description": "Nx plugin for automated releases using semantic-release.",
"url": "https://github.com/TheUnderScorer/nx-semantic-release"
},
{
"name": "nx-pwm",
"description": "Nx plugin and CLI to help maintain packages, inspired by NX repo tooling",
"url": "https://github.com/gioragutt/nx-pwm"
},
{
"name": "@nxrocks/nx-micronaut",
"description": "Nx plugin to generate, run, package, build (and more) Micronaut projects inside your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-micronaut"
},
{
"name": "@koliveira15/nx-sonarqube",
"description": "Nx plugin that scans projects using SonarQube / SonarCloud.",
"url": "https://github.com/koliveira15/nx-sonarqube"
},
{
"name": "@mands/nx-playwright",
"description": "The Playwright plugin allows your workspace to use the power of Playwright end-to-end testing using a native runner.",
"url": "https://github.com/marksandspencer/nx-plugins/tree/main/packages/nx-playwright"
},
{
"name": "@diogovcs/stryker-mutator",
"description": "Nx plugin to add Stryker Mutator mutation tests to the Nx Workspace.",
"url": "https://github.com/DiogoVCS/nx-workspace-plugins"
},
{
"name": "@spaceribs/nx-web-ext",
"description": "Nx plugin that allows you to build, test and deploy web extensions.",
"url": "https://github.com/spaceribs/spaceribs/tree/main/packages/nx-web-ext"
},
{
"name": "@spaceribs/nx-betterer",
"description": "Nx plugin that applies betterer standards on a per-project basis.",
"url": "https://github.com/spaceribs/spaceribs/tree/main/packages/nx-betterer"
},
{
"name": "@nx-tools/nx-container",
"description": "Nx plugin to build OCI containers with Docker, Podman or Kaniko.",
"url": "https://github.com/gperdomor/nx-tools/tree/main/packages/nx-container"
},
{
"name": "@nxrocks/nx-melos",
"description": "Nx plugin adding first class support for Melos in your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-melos"
},
{
"name": "@monodon/rust",
"description": "Adds Cargo and Rust support",
"url": "https://github.com/cammisuli/monodon/tree/main/packages/rust"
},
{
"name": "nx-mesh",
"description": "GraphQL Mesh support for Nx",
"url": "https://github.com/domjtalbot/nx-mesh"
},
{
"name": "@nxazure/func",
"description": "Nx plugin to add Azure Functions support to Nx Workspace.",
"url": "https://github.com/AlexPshul/nxazure/tree/master/packages/func"
},
{
"name": "@rbnx/webdriverio",
"description": "A Nx plugin that adds the WebdriverIO testing framework to a NX workspace.",
"url": "https://github.com/Roozenboom/rbnx/tree/main/packages/webdriverio"
},
{
"name": "nx-ngrok",
"description": "Ngrok support for Nx",
"url": "https://github.com/domjtalbot/nx-ngrok"
},
{
"name": "@nxrocks/nx-ktor",
"description": "Nx plugin to generate, run, package, build (and more) Ktor projects inside your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-ktor"
},
{
"name": "nx-size-limit",
"description": "Adds size-limit support for Nx (performance budget tool for JavaScript)",
"url": "https://github.com/LironHazan/nx-size-limit"
},
{
"name": "@loft-orbital/terraform",
"description": "Terraform executors and generators",
"url": "https://github.com/loft-orbital/nx-plugins/tree/main/packages/terraform"
},
{
"name": "@nxlv/python",
"description": "Nx plugin designed to extend the Nx features to work with Python projects based on Poetry.",
"url": "https://github.com/lucasvieirasilva/nx-plugins/tree/main/packages/nx-python"
},
{
"name": "nx-gcp-cache",
"description": "Nx plugin to use Google Cloud Storage as distributed remote cache",
"url": "https://github.com/davidgarciab/nx-gcp-cache"
},
{
"name": "@jnxplus/nx-gradle",
"description": "Nx plugin to add Gradle multi-project builds support to Nx workspace",
"url": "https://github.com/khalilou88/jnxplus/tree/main/packages/nx-gradle"
},
{
"name": "@jnxplus/nx-maven",
"description": "Nx plugin to add Maven multi-module project support to Nx workspace",
"url": "https://github.com/khalilou88/jnxplus/tree/main/packages/nx-maven"
},
{
"name": "@naxodev/nx-cloudflare",
"description": "Nx plugin for Cloudflare, in particular Cloudflare workers. It allows to generate build and run Cloudflare workers in your Nx workspace.",
"url": "https://github.com/naxodev/oss/tree/main/packages/plugins/nx-cloudflare"
},
{
"name": "@ziacik/azure-func",
"description": "Generating, serving and publishing Azure Functions 4 apps.",
"url": "https://github.com/ziacik/nx-tools/tree/master/packages/azure-func"
},
{
"name": "@simondotm/nx-firebase",
"description": "Nx plugin to support Firebase Apps and Cloud Functions in Nx workspaces",
"url": "https://github.com/simondotm/nx-firebase"
},
{
"name": "@dman926/nx-python-pdm",
"description": "Use Python in NX workspaces with PDM",
"url": "https://github.com/dman926/nx-python-pdm"
},
{
"name": "@gnuechtel/nx-cucumber",
"description": "Plugin to use Cucumber within Nx workspaces",
"url": "https://gitlab.com/gnuechtel/open-source/-/tree/main/libs/nx-cucumber"
},
{
"name": "@analogjs/platform",
"description": "Official plugin to add Analog to your Nx monorepo.",
"url": "https://analogjs.org/docs/integrations/nx"
},
{
"name": "@getlarge/nx-heroku",
"description": "Plugin to deploy and promote Nx apps on Heroku",
"url": "https://github.com/getlarge/nx-heroku"
},
{
"name": "@huge-nx/conventions",
"description": "Plugin to generate and manage Nx workspaces by adhering to established workspace conventions.",
"url": "https://github.com/jogelin/huge-nx"
}
]
+113 -113
View File
@@ -8,10 +8,10 @@ When writing documentation, it is important to know the audience you are writing
We are generally following the [Diataxis](https://diataxis.fr) model where documents are divided into tutorials, concept guides, recipes and reference.
- Tutorial - Focused on explaining a concept through step by step instructions.
- Concept guide - Explains why something works the way it does or how to think about something.
- Recipe - Focused directions to accomplish a specific task. Describes how to do something.
- Reference - Lists what you can do with the tool (i.e. API docs).
- Tutorial - Focused on explaining a concept through step by step instructions.
- Concept guide - Explains why something works the way it does or how to think about something.
- Recipe - Focused directions to accomplish a specific task. Describes how to do something.
- Reference - Lists what you can do with the tool (i.e. API docs).
### Audiences
@@ -19,40 +19,40 @@ We also have different audiences in mind when writing docs:
👶 New user starting from scratch
- They know their framework of choice
- They have probably heard the term monorepo but don't really know what it is
- They're smart and eager to learn
- They know their framework of choice
- They have probably heard the term monorepo but don't really know what it is
- They're smart and eager to learn
👶 New user migrating an existing repo
- They know their framework of choice
- They know how npm workspaces work
- They're smart and eager to learn
- They know their framework of choice
- They know how npm workspaces work
- They're smart and eager to learn
👦 Intermediate User
- They know how to create an Nx repo or add Nx to an existing repo
- They have heard the terms integrated and package-based
- They know what a project is and how to make one
- They understand how to run a task and the basics of caching
- They can launch the graph
- They know that it is possible to enforce project boundaries
- They know how to create an Nx repo or add Nx to an existing repo
- They have heard the terms integrated and package-based
- They know what a project is and how to make one
- They understand how to run a task and the basics of caching
- They can launch the graph
- They know that it is possible to enforce project boundaries
👨‍🦳 Advanced User
- They know everything about Nx except the specific piece of knowledge that is being taught by this document.
- They know everything about Nx except the specific piece of knowledge that is being taught by this document.
### Outline
- Getting Started - These documents assume a new user and are generally concept guides with a lot of links to other parts of the site. There are some elements of recipes mixed in, but those should be kept to a minimum.
- Tutorials - These are tutorials written for a new user. After completing one of these tutorials, the user should have enough knowledge to be an intermediate user.
- Core Features - These are primarily recipes with a little concept mixed in. These documents should be short and provide the basic information that people will want 80% of the time and link to anything more complex. A new user should be able to click through these documents and skim them to get a good understanding of what Nx does without getting overwhelmed with details.
- Concepts - These are concept guides written for a new user. Any recipe content should be split into a recipe document and linked.
- More Concepts (or other categories under Concepts) - These are concept guides written for an intermediate user.
- Recipes - These are recipes written for an advanced user.
- Nx with Your Favorite Tech - These are tutorials written for an intermediate user.
- Benchmarks - Reference documents linking to external resources.
- Reference - Reference documents.
- Getting Started - These documents assume a new user and are generally concept guides with a lot of links to other parts of the site. There are some elements of recipes mixed in, but those should be kept to a minimum.
- Tutorials - These are tutorials written for a new user. After completing one of these tutorials, the user should have enough knowledge to be an intermediate user.
- Core Features - These are primarily recipes with a little concept mixed in. These documents should be short and provide the basic information that people will want 80% of the time and link to anything more complex. A new user should be able to click through these documents and skim them to get a good understanding of what Nx does without getting overwhelmed with details.
- Concepts - These are concept guides written for a new user. Any recipe content should be split into a recipe document and linked.
- More Concepts (or other categories under Concepts) - These are concept guides written for an intermediate user.
- Recipes - These are recipes written for an advanced user.
- Nx with Your Favorite Tech - These are tutorials written for an intermediate user.
- Benchmarks - Reference documents linking to external resources.
- Reference - Reference documents.
## Markdown syntax available
@@ -64,8 +64,8 @@ Front matter is used to add metadata to your Markdown file (`title` & `descripti
If no Front matter is detected, the metadata will be populated with the following:
- `title`: first main title detected
- `description`: first paragraph detected
- `title`: first main title detected
- `description`: first paragraph detected
```markdown
---
@@ -309,34 +309,34 @@ Embed a Project Details View that is identical what is shown in Nx Console or `n
```json
{
"project": {
"name": "demo",
"data": {
"root": " packages/demo",
"projectType": "application",
"targets": {
"dev": {
"executor": "nx:run-commands",
"options": {
"command": "vite dev"
}
},
"build": {
"executor": "nx:run-commands",
"inputs": ["production", "^production"],
"outputs": ["{projectRoot}/dist"],
"options": {
"command": "vite build"
}
}
"project": {
"name": "demo",
"data": {
"root": " packages/demo",
"projectType": "application",
"targets": {
"dev": {
"executor": "nx:run-commands",
"options": {
"command": "vite dev"
}
},
"build": {
"executor": "nx:run-commands",
"inputs": ["production", "^production"],
"outputs": ["{projectRoot}/dist"],
"options": {
"command": "vite build"
}
}
}
}
}
},
"sourceMap": {
"targets": ["packages/demo/vite.config.ts", "@nx/vite"],
"targets.dev": ["packages/demo/vite.config.ts", "@nx/vite"],
"targets.build": ["packages/demo/vite.config.ts", "@nx/vite"]
}
},
"sourceMap": {
"targets": ["packages/demo/vite.config.ts", "@nx/vite"],
"targets.dev": ["packages/demo/vite.config.ts", "@nx/vite"],
"targets.build": ["packages/demo/vite.config.ts", "@nx/vite"]
}
}
```
@@ -352,65 +352,65 @@ Embed an Nx Graph visualization that can be panned by the user.
```json
{
"projects": [
{
"type": "app",
"name": "app-changed",
"data": {
"tags": ["scope:cart"]
}
},
{
"type": "lib",
"name": "lib",
"data": {
"tags": ["scope:cart"]
}
},
{
"type": "lib",
"name": "lib2",
"data": {
"tags": ["scope:cart"]
}
},
{
"type": "lib",
"name": "lib3",
"data": {
"tags": ["scope:cart"]
}
}
],
"groupByFolder": false,
"workspaceLayout": {
"appsDir": "apps",
"libsDir": "libs"
},
"dependencies": {
"app-changed": [
"projects": [
{
"target": "lib",
"source": "app-changed",
"type": "direct"
}
],
"lib": [
{
"target": "lib2",
"source": "lib",
"type": "implicit"
"type": "app",
"name": "app-changed",
"data": {
"tags": ["scope:cart"]
}
},
{
"target": "lib3",
"source": "lib",
"type": "direct"
"type": "lib",
"name": "lib",
"data": {
"tags": ["scope:cart"]
}
},
{
"type": "lib",
"name": "lib2",
"data": {
"tags": ["scope:cart"]
}
},
{
"type": "lib",
"name": "lib3",
"data": {
"tags": ["scope:cart"]
}
}
],
"lib2": [],
"lib3": []
},
"affectedProjectIds": []
],
"groupByFolder": false,
"workspaceLayout": {
"appsDir": "apps",
"libsDir": "libs"
},
"dependencies": {
"app-changed": [
{
"target": "lib",
"source": "app-changed",
"type": "direct"
}
],
"lib": [
{
"target": "lib2",
"source": "lib",
"type": "implicit"
},
{
"target": "lib3",
"source": "lib",
"type": "direct"
}
],
"lib2": [],
"lib3": []
},
"affectedProjectIds": []
}
```
@@ -421,9 +421,9 @@ Embed an Nx Graph visualization that can be panned by the user.
There are multiple versions of the `nx.dev` site.
- [canary.nx.dev](https://canary.nx.dev) contains the documentation on the `master` branch
- [nx.dev](https://nx.dev) contains the documentation as of the latest release of Nx to npm. The main site will not include reference documentation for APIs that have been merged to the codebase, but not yet released to the public.
- `[version].nx.dev` contains the documentation for that version of Nx. `[version]` in this case is the major version up to the current LTS version of Nx. So [18.nx.dev](https://18.nx.dev) will show the Nx documentation as of the last released version of Nx 18.
- [canary.nx.dev](https://canary.nx.dev) contains the documentation on the `master` branch
- [nx.dev](https://nx.dev) contains the documentation as of the latest release of Nx to npm. The main site will not include reference documentation for APIs that have been merged to the codebase, but not yet released to the public.
- `[version].nx.dev` contains the documentation for that version of Nx. `[version]` in this case is the major version up to the current LTS version of Nx. So [18.nx.dev](https://18.nx.dev) will show the Nx documentation as of the last released version of Nx 18.
When a commit that contains documentation is merged into `master`, it will be immediately published to `canary.nx.dev`. Whenever a new release of Nx is published to npm, that documentation will then be available on the main site.
+17 -17
View File
@@ -12,14 +12,14 @@ In the last couple of months we have quadrupled the team and have done some amaz
**Table of Contents**
- [New, Streamlined UI](#new-streamlined-ui)
- [Prefetching and Faster Cache Uploading](#prefetching-and-faster-cache-uploading)
- [DTE Just got Better](#dte-just-got-better)
- [Direct Integration With GitHub, GitLab and Bitbucket](#direct-integration-with-github-gitlab-and-bitbucket)
- [Enterprise Support](#enterprise-support)
- [New, Simplified Plans and Pricing Model](#new-simplified-plans-and-pricing-model)
- [Coming Next](#coming-next)
- [Learn more](#learn-more)
- [New, Streamlined UI](#new-streamlined-ui)
- [Prefetching and Faster Cache Uploading](#prefetching-and-faster-cache-uploading)
- [DTE Just got Better](#dte-just-got-better)
- [Direct Integration With GitHub, GitLab and Bitbucket](#direct-integration-with-github-gitlab-and-bitbucket)
- [Enterprise Support](#enterprise-support)
- [New, Simplified Plans and Pricing Model](#new-simplified-plans-and-pricing-model)
- [Coming Next](#coming-next)
- [Learn more](#learn-more)
**Prefer a Video? Weve got you Covered!**
@@ -80,9 +80,9 @@ We have extensive experience working with Fortune 500 companies, helping them sc
Weve recently made a couple of improvements to our enterprise offering.
- **Helm Charts** — We added a **Helm chart** to simplify the process of deploying Nx Cloud to on-premises infrastructure, allowing organizations to quickly set up and manage their own instance of Nx Cloud within their secure environment.
- **Stability improvements** — We significantly reworked our on-premises solution to be identical to our SaaS deployment. This revamp resulted in a more robust and reliable on-premises deployment of Nx Cloud, ensuring enterprise-grade performance and reliability.
- **SSO** — We now support AWS Identity and Access Management (IAM) for seamless integration with existing AWS environments and the SAML protocol for a more flexible single sign-on integration across various providers. This enables organizations to leverage their existing identity management systems for authentication and authorization.
- **Helm Charts** — We added a **Helm chart** to simplify the process of deploying Nx Cloud to on-premises infrastructure, allowing organizations to quickly set up and manage their own instance of Nx Cloud within their secure environment.
- **Stability improvements** — We significantly reworked our on-premises solution to be identical to our SaaS deployment. This revamp resulted in a more robust and reliable on-premises deployment of Nx Cloud, ensuring enterprise-grade performance and reliability.
- **SSO** — We now support AWS Identity and Access Management (IAM) for seamless integration with existing AWS environments and the SAML protocol for a more flexible single sign-on integration across various providers. This enables organizations to leverage their existing identity management systems for authentication and authorization.
Learn more at [enterprise](/enterprise).
@@ -114,9 +114,9 @@ In addition, we are actively exploring ways to provide advanced analytics for yo
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+97 -97
View File
@@ -10,15 +10,15 @@ Over the last few weeks, we rebuilt one of Nx Consoles most liked features fr
You can use it today by installing the latest version of Nx Console for VSCode and JetBrains IDEs! 🎉🎉🎉
- [Nx Console on the VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console)
- [Nx Console on the JetBrains Marketplace](https://plugins.jetbrains.com/plugin/21060-nx-console)
- [Nx Console on the VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console)
- [Nx Console on the JetBrains Marketplace](https://plugins.jetbrains.com/plugin/21060-nx-console)
If youre curious to learn more about the rewrite and the motivations behind it, this is the blog post for you! Well touch on these topics and more:
- Why did we choose to rewrite?
- Whats Lit and why did we use it over Angular?
- How did the rewrite go and what Lit features were important for us?
- What does the performance look like before and after?
- Why did we choose to rewrite?
- Whats Lit and why did we use it over Angular?
- How did the rewrite go and what Lit features were important for us?
- What does the performance look like before and after?
{% youtube src="https://www.youtube.com/embed/p455D4W7330?si=FRbiKJhGxT8dYzf9" /%}
@@ -54,17 +54,17 @@ Before I dive deeper into specifics, lets have a look at the general architec
Nx Console is composed of 3 core parts:
- The **nxls** is a language server based on the [Language Server Protocol (LSP)](https://microsoft.github.io/language-server-protocol/) and acts as the “brain” of Nx Console. It analyzes your Nx workspace and provides information on it, including code completion and more.
- The **Generate UI** is the form-based view for running Nx generators.
- The **platform-specific wrappers**. These are written in Typescript and Kotlin and connect the rest of Nx Console to IDE-specific APIs. Having the other parts separate greatly reduces the amount of duplicated code we have to write in order to support multiple IDEs
- The **nxls** is a language server based on the [Language Server Protocol (LSP)](https://microsoft.github.io/language-server-protocol/) and acts as the “brain” of Nx Console. It analyzes your Nx workspace and provides information on it, including code completion and more.
- The **Generate UI** is the form-based view for running Nx generators.
- The **platform-specific wrappers**. These are written in Typescript and Kotlin and connect the rest of Nx Console to IDE-specific APIs. Having the other parts separate greatly reduces the amount of duplicated code we have to write in order to support multiple IDEs
This architectures modularity meant we could quickly switch out the Generate UI for a new version without significantly impacting the rest of the codebase — only the parts that actually render the UI and communicate with it had to be adjusted slightly. It also allowed us to ensure backward compatibility: the old generate UI is still available via a feature toggle in the settings.
If you want to dive deeper, there are many more resources on the architecture of Nx Console and how its built:
- [In-depth blog post about expanding to JetBrains IDEs](https://blog.nrwl.io/expanding-nx-console-to-jetbrains-ides-8a5b80fff2d7?source=friends_link&sk=967080ea30bdbf9f8132f098a2cdd188)
- [Accompanying Youtube video by Zack DeRose](https://www.youtube.com/watch?v=xUTm6GDqwJM)
- [The Power of Nx Console — talk by Jon Cammisuli](https://www.youtube.com/watch?v=3C_9g9kt2KM)
- [In-depth blog post about expanding to JetBrains IDEs](https://blog.nrwl.io/expanding-nx-console-to-jetbrains-ides-8a5b80fff2d7?source=friends_link&sk=967080ea30bdbf9f8132f098a2cdd188)
- [Accompanying Youtube video by Zack DeRose](https://www.youtube.com/watch?v=xUTm6GDqwJM)
- [The Power of Nx Console — talk by Jon Cammisuli](https://www.youtube.com/watch?v=3C_9g9kt2KM)
## Migrating to Lit: Step by Step
@@ -76,9 +76,9 @@ This generates an entire project for us, with a `tsconfig.json`, `index.html`, `
I also installed a couple of dependencies:
- The `@nx/esbuild` plugin because I like fast build times 🏎️
- TailwindCSS because I dont like writing CSS 🤫
- `@vscode/webview-ui-toolkit` because it does all of the VSCode work for me 🤖
- The `@nx/esbuild` plugin because I like fast build times 🏎️
- TailwindCSS because I dont like writing CSS 🤫
- `@vscode/webview-ui-toolkit` because it does all of the VSCode work for me 🤖
This is really where Nx shines, because it allows you to take these tools and quickly patch them together and build a pipeline that does exactly what you need. And it also allows you to think about your workspace visually. This is what this is what my task graph for building the Lit app ultimately looks like:
@@ -86,15 +86,15 @@ This is really where Nx shines, because it allows you to take these tools and qu
You can see three build steps:
- `generate-ui-v2:_build` uses esbuild to bundle my Lit components written in Typescript and spits out a `main.js` file
- `generate-ui-v2:extract-dependencies` copies the third party assets we need into the dist folder. Right now its just codicons `.css` and `.ttf` files.
- `generate-ui-v2:build` finally runs tailwind over the bundled code. This could also be done with `postCss` or a custom `esbuild` plugin but running tailwind directly is the easier, so why complicate things?
- `generate-ui-v2:_build` uses esbuild to bundle my Lit components written in Typescript and spits out a `main.js` file
- `generate-ui-v2:extract-dependencies` copies the third party assets we need into the dist folder. Right now its just codicons `.css` and `.ttf` files.
- `generate-ui-v2:build` finally runs tailwind over the bundled code. This could also be done with `postCss` or a custom `esbuild` plugin but running tailwind directly is the easier, so why complicate things?
> 💡 There are different ways to generate this visualisation for your own workspaces:
>
> - In VSCode, use the Nx Project View or the `Nx: Focus task in Graph` action
> - In JetBrains IDEs, use the Nx Toolwindow or context menus
> - In the command line, run `nx build {{your project}} --graph`
> - In VSCode, use the Nx Project View or the `Nx: Focus task in Graph` action
> - In JetBrains IDEs, use the Nx Toolwindow or context menus
> - In the command line, run `nx build {{your project}} --graph`
In the bigger context of Nx Console, heres what happens when you build the VSCode extension:
@@ -109,19 +109,19 @@ Lit is a very small library that provides useful abstractions over browser-nativ
```ts {% fileName="main.ts" %}
@customElement('root-element')
export class Root extends LitElement {
render() {
return html`<p>Hello World</p>`;
}
render() {
return html`<p>Hello World</p>`;
}
}
```
```html {% fileName="index.html" %}
<!DOCTYPE html>
<html lang="en">
<body>
<script type="module" src="main.js"></script>
<root-element></root-element>
</body>
<body>
<script type="module" src="main.js"></script>
<root-element></root-element>
</body>
</html>
```
@@ -136,29 +136,29 @@ To communicate with the host IDE, we were able to reuse almost all the logic fro
```ts {% fileName="main.ts" %}
@customElement('root-element')
export class Root extends LitElement {
icc: IdeCommunicationController;
icc: IdeCommunicationController;
constructor() {
super();
this.icc = new IdeCommunicationController(this);
}
render() {
return html`${JSON.stringify(this.icc.generatorSchema)}`;
}
constructor() {
super();
this.icc = new IdeCommunicationController(this);
}
render() {
return html`${JSON.stringify(this.icc.generatorSchema)}`;
}
}
```
```ts {% fileName="ide-communication-controller.ts" %}
// ide-communication-controller.ts
export class IdeCommunicationController implements ReactiveController {
generatorSchema: GeneratorSchema | undefined;
constructor(private host: ReactiveControllerHost) {}
// ...
private handleMessageFromIde(message: InputMessage) {
// ...
this.generatorSchema = message.payload;
this.host.requestUpdate();
}
generatorSchema: GeneratorSchema | undefined;
constructor(private host: ReactiveControllerHost) {}
// ...
private handleMessageFromIde(message: InputMessage) {
// ...
this.generatorSchema = message.payload;
this.host.requestUpdate();
}
}
```
@@ -170,42 +170,42 @@ The core part of the UI is the form. We built all kinds of inputs: text fields,
```ts {% fileName="field-mixin.ts" %}
const Field = (superClass) =>
class extends superClass {
// we can define (reactive) properties that every field is going to need
@property()
option: Option;
protected get fieldId(): string {
return `${this.option.name}-field`;
}
class extends superClass {
// we can define (reactive) properties that every field is going to need
@property()
option: Option;
protected get fieldId(): string {
return `${this.option.name}-field`;
}
// we can define methods that should be available to all fields
dispatchValue(value: string) {
// ...
}
};
// we can define methods that should be available to all fields
dispatchValue(value: string) {
// ...
}
};
```
```ts {% fileName="field-wrapper-mixin.ts" %}
const FieldWrapper = (superClass) =>
class extends superClass {
// we can define a render() method so that fields are all rendered the same
protected render() {
return html` <label for="${this.fieldId}">${this.option.name}</label>
<p>${this.option.description}</p>
${this.renderField()}`;
}
};
class extends superClass {
// we can define a render() method so that fields are all rendered the same
protected render() {
return html` <label for="${this.fieldId}">${this.option.name}</label>
<p>${this.option.description}</p>
${this.renderField()}`;
}
};
```
```ts {% fileName="input-field.ts" %}
@customElement('input-field')
export class InputField extends FieldWrapper(Field(LitElement)) {
renderField() {
return html` <input
id="${this.fieldId}"
@input="${(e) => this.dispatchValue(e.target.value)}"
/>`;
}
renderField() {
return html` <input
id="${this.fieldId}"
@input="${(e) => this.dispatchValue(e.target.value)}"
/>`;
}
}
```
@@ -225,37 +225,37 @@ Have a look at the following example:
```ts {% fileName="editor-context.ts" %}
export const editorContext = createContext<'vscode' | 'intellij'>(
Symbol('editor')
Symbol('editor')
);
const EditorContext = (superClass) =>
class extends superClass {
@consume({ context: editorContext })
@state()
editor: 'vscode' | 'intellij';
};
class extends superClass {
@consume({ context: editorContext })
@state()
editor: 'vscode' | 'intellij';
};
```
```ts {% fileName="ide-communication-controller.ts" %}
export class IdeCommunicationController implements ReactiveController {
// ...
constructor(private host: ReactiveElement) {
const editor = isVscode() ? 'vscode' : 'intellij';
// provide the context to all DOM children of the host element
new ContextProvider(host, {
context: editorContext,
initialValue: editor,
});
}
// ...
constructor(private host: ReactiveElement) {
const editor = isVscode() ? 'vscode' : 'intellij';
// provide the context to all DOM children of the host element
new ContextProvider(host, {
context: editorContext,
initialValue: editor,
});
}
}
```
```ts {% fileName="some-component.ts" %}
@customElement('some-component')
export class SomeComponent extends EditorContext(LitElement) {
render() {
return html`<p>I am rendered in ${this.editor}</p>`;
}
render() {
return html`<p>I am rendered in ${this.editor}</p>`;
}
}
```
@@ -320,9 +320,9 @@ So keep your eyes peeled for announcements and let us know via GitHub or Twitter
Nx Console is a tool by developers for developers and theres one thing we love — keyboard shortcuts. So of course we had to build some in. In addition to being keyboard-friendly and tabbable, you can do the following:
- `Cmd/Ctrl + Enter` to run the generator
- `Cmd/Ctrl + Shift + Enter` to start a dry run
- `Cmd/Ctrl + Shift + S` to focus the search bar and look for a specific option. Just `tab` to get back to the form
- `Cmd/Ctrl + Enter` to run the generator
- `Cmd/Ctrl + Shift + Enter` to start a dry run
- `Cmd/Ctrl + Shift + S` to focus the search bar and look for a specific option. Just `tab` to get back to the form
If the prettier UI and better performance havent convinced you, this surely will! 😉
@@ -330,9 +330,9 @@ If the prettier UI and better performance havent convinced you, this surely w
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+274 -274
View File
@@ -19,19 +19,19 @@ In this blog post, well explore how to combine the strengths of Nx and Qwik t
**Table of Contents**
- [Creating the Workspace](#creating-the-workspace)
- [Generate the App](#generate-the-app)
- [Generate a new Route](#generate-a-new-route)
- [Build a Basic UI](#build-a-basic-ui)
- [Generate a Library](#generate-a-library)
- [Add a Qwik Context](#add-a-qwik-context)
- [Using the Context](#using-the-context)
- [Adding a `routeLoader$` to load data on Navigation](#adding-a-routeloader-to-load-data-on-navigation)
- [Handle the Form Action to add todos](#handle-the-form-action-to-add-todos)
- [Improve the Architecture](#improve-the-architecture)
- [Conclusion](#conclusion)
- [Further Reading](#further-reading)
- [Learn more](#learn-more)
- [Creating the Workspace](#creating-the-workspace)
- [Generate the App](#generate-the-app)
- [Generate a new Route](#generate-a-new-route)
- [Build a Basic UI](#build-a-basic-ui)
- [Generate a Library](#generate-a-library)
- [Add a Qwik Context](#add-a-qwik-context)
- [Using the Context](#using-the-context)
- [Adding a `routeLoader$` to load data on Navigation](#adding-a-routeloader-to-load-data-on-navigation)
- [Handle the Form Action to add todos](#handle-the-form-action-to-add-todos)
- [Improve the Architecture](#improve-the-architecture)
- [Conclusion](#conclusion)
- [Further Reading](#further-reading)
- [Learn more](#learn-more)
You can learn more about this integration in the video below:
@@ -93,7 +93,7 @@ The newly created file should look like this:
import { component$ } from '@builder.io/qwik';
export default component$(() => {
return <div>This is the todo</div>;
return <div>This is the todo</div>;
});
```
@@ -114,21 +114,21 @@ import { component$ } from '@builder.io/qwik';
import { Form } from '@builder.io/qwik-city';
export default component$(() => {
return (
<div>
<h1>Todos</h1>
return (
<div>
<label>
<input type="checkbox" /> {'My First Todo'}
</label>
<h1>Todos</h1>
<div>
<label>
<input type="checkbox" /> {'My First Todo'}
</label>
</div>
<Form>
<input type="hidden" name="id" value={1} />
<input type="text" name="message" />
<button type="submit">Add</button>
</Form>
</div>
<Form>
<input type="hidden" name="id" value={1} />
<input type="text" name="message" />
<button type="submit">Add</button>
</Form>
</div>
);
);
});
```
@@ -180,8 +180,8 @@ Create `libs/data-access/src/lib/api.ts` and add the following:
```ts {% fileName="libs/data-access/src/lib/api.ts" %}
export interface Todo {
id: number;
message: string;
id: number;
message: string;
}
```
@@ -189,27 +189,27 @@ Next, lets create a new file `libs/data-access/src/lib/todo.context.tsx` and
```tsx {% fileName="libs/data-access/src/lib/todo.context.tsx" %}
import {
component$,
createContextId,
Slot,
useContextProvider,
useStore,
component$,
createContextId,
Slot,
useContextProvider,
useStore,
} from '@builder.io/qwik';
import { Todo } from './api';
interface TodoStore {
todos: Todo[];
lastId: number;
todos: Todo[];
lastId: number;
}
export const TodoContext = createContextId<TodoStore>('todo.context');
export const TodoContextProvider = component$(() => {
const todoStore = useStore<TodoStore>({
todos: [],
lastId: 0,
});
useContextProvider(TodoContext, todoStore);
return <Slot />;
const todoStore = useStore<TodoStore>({
todos: [],
lastId: 0,
});
useContextProvider(TodoContext, todoStore);
return <Slot />;
});
```
@@ -226,37 +226,37 @@ Lets update the root page to add our Context Provider. Open `apps/todo/src/ro
```tsx {% fileName="apps/todo/src/root.tsx" %}
import { component$, useStyles$ } from '@builder.io/qwik';
import {
QwikCityProvider,
RouterOutlet,
ServiceWorkerRegister,
QwikCityProvider,
RouterOutlet,
ServiceWorkerRegister,
} from '@builder.io/qwik-city';
import { RouterHead } from './components/router-head/router-head';
import globalStyles from './global.css?inline';
import { TodoContextProvider } from '@qwik-todo-app/data-access';
export default component$(() => {
/**
* The root of a QwikCity site always start with the <QwikCityProvider> component,
* immediately followed by the document's <head> and <body>.
*
* Don't remove the `<head>` and `<body>` elements.
*/
useStyles$(globalStyles);
return (
<QwikCityProvider>
<TodoContextProvider>
<head>
<meta charSet="utf-8" />
<link rel="manifest" href="/manifest.json" />
<RouterHead />
</head>
<body lang="en">
<RouterOutlet />
<ServiceWorkerRegister />
</body>
</TodoContextProvider>
</QwikCityProvider>
);
/**
* The root of a QwikCity site always start with the <QwikCityProvider> component,
* immediately followed by the document's <head> and <body>.
*
* Don't remove the `<head>` and `<body>` elements.
*/
useStyles$(globalStyles);
return (
<QwikCityProvider>
<TodoContextProvider>
<head>
<meta charSet="utf-8" />
<link rel="manifest" href="/manifest.json" />
<RouterHead />
</head>
<body lang="en">
<RouterOutlet />
<ServiceWorkerRegister />
</body>
</TodoContextProvider>
</QwikCityProvider>
);
});
```
@@ -277,24 +277,24 @@ import { Form } from '@builder.io/qwik-city';
import { TodoContext } from '@qwik-todo-app/data-access';
export default component$(() => {
const todoStore = useContext(TodoContext);
return (
<div>
<h1>Todos</h1>
{todoStore.todos.map((t) => (
<div key={`todo-${t.id}`}>
<label>
<input type="checkbox" /> {t.message}
</label>
</div>
))}
<Form>
<input type="hidden" name="id" value={1} />
<input type="text" name="message" />
<button type="submit">Add</button>
</Form>
</div>
);
const todoStore = useContext(TodoContext);
return (
<div>
<h1>Todos</h1>
{todoStore.todos.map((t) => (
<div key={`todo-${t.id}`}>
<label>
<input type="checkbox" /> {t.message}
</label>
</div>
))}
<Form>
<input type="hidden" name="id" value={1} />
<input type="text" name="message" />
<button type="submit">Add</button>
</Form>
</div>
);
});
```
@@ -314,37 +314,37 @@ Well start by updating our `libs/data-access/src/lib/api.ts` to add our in-me
```ts {% fileName="libs/data-access/src/lib/api.ts" %}
export interface Todo {
id: number;
message: string;
id: number;
message: string;
}
interface DB {
store: Record<string, any[]>;
get: (storeName: string) => any[];
set: (storeName: string, value: any[]) => boolean;
add: (storeName: string, value: any) => boolean;
store: Record<string, any[]>;
get: (storeName: string) => any[];
set: (storeName: string, value: any[]) => boolean;
add: (storeName: string, value: any) => boolean;
}
export const db: DB = {
store: { todos: [] },
get(storeName) {
return db.store[storeName];
},
set(storeName, value) {
try {
db.store[storeName] = value;
return true;
} catch (e) {
return false;
}
},
add(storeName, value) {
try {
db.store[storeName].push(value);
return true;
} catch (e) {
return false;
}
},
store: { todos: [] },
get(storeName) {
return db.store[storeName];
},
set(storeName, value) {
try {
db.store[storeName] = value;
return true;
} catch (e) {
return false;
}
},
add(storeName, value) {
try {
db.store[storeName].push(value);
return true;
} catch (e) {
return false;
}
},
};
```
@@ -358,51 +358,51 @@ import { Form, routeLoader$ } from '@builder.io/qwik-city';
import { TodoContext, db } from '@qwik-todo-app/data-access';
export const useGetTodos = routeLoader$(() => {
// A network request or db connection could be made here to fetch persisted todos
// For illustrative purposes, we're going to seed a rudimentary in-memory DB if it hasn't been already
// Then return the value from it
if (db.get('todos')?.length === 0) {
db.set('todos', [
{
id: 1,
message: 'First todo',
},
]);
}
const todos: Todo[] = db.get('todos');
const lastId = [...todos].sort((a, b) => b.id - a.id)[0].id;
return { todos, lastId };
// A network request or db connection could be made here to fetch persisted todos
// For illustrative purposes, we're going to seed a rudimentary in-memory DB if it hasn't been already
// Then return the value from it
if (db.get('todos')?.length === 0) {
db.set('todos', [
{
id: 1,
message: 'First todo',
},
]);
}
const todos: Todo[] = db.get('todos');
const lastId = [...todos].sort((a, b) => b.id - a.id)[0].id;
return { todos, lastId };
});
export default component$(() => {
const todoStore = useContext(TodoContext);
const persistedTodos = useGetTodos();
useTask$(({ track }) => {
track(() => persistedTodos.value);
if (persistedTodos.value) {
todoStore.todos = persistedTodos.value.todos;
todoStore.lastId =
todoStore.lastId > persistedTodos.value.lastId
? todoStore.lastId
: persistedTodos.value.lastId;
}
});
return (
<div>
<h1>Todos</h1>
{todoStore.todos.map((t) => (
<div key={`todo-${t.id}`}>
<label>
<input type="checkbox" /> {t.message}
</label>
</div>
))}
<Form>
<input type="hidden" name="id" value={1} />
<input type="text" name="message" />
<button type="submit">Add</button>
</Form>
</div>
);
const todoStore = useContext(TodoContext);
const persistedTodos = useGetTodos();
useTask$(({ track }) => {
track(() => persistedTodos.value);
if (persistedTodos.value) {
todoStore.todos = persistedTodos.value.todos;
todoStore.lastId =
todoStore.lastId > persistedTodos.value.lastId
? todoStore.lastId
: persistedTodos.value.lastId;
}
});
return (
<div>
<h1>Todos</h1>
{todoStore.todos.map((t) => (
<div key={`todo-${t.id}`}>
<label>
<input type="checkbox" /> {t.message}
</label>
</div>
))}
<Form>
<input type="hidden" name="id" value={1} />
<input type="text" name="message" />
<button type="submit">Add</button>
</Form>
</div>
);
});
```
@@ -422,64 +422,64 @@ import { Form, routeLoader$ } from '@builder.io/qwik-city';
import { TodoContext, db } from '@qwik-todo-app/data-access';
export const useGetTodos = routeLoader$(() => {
// A network request or db connection could be made here to fetch persisted todos
// For illustrative purposes, we're going to seed a rudimentary in-memory DB if it hasn't been already
// Then return the value from it
if (db.get('todos')?.length === 0) {
db.set('todos', [
{
id: 1,
message: 'First todo',
},
]);
}
const todos: Todo[] = db.get('todos');
const lastId = [...todos].sort((a, b) => b.id - a.id)[0].id;
return { todos, lastId };
// A network request or db connection could be made here to fetch persisted todos
// For illustrative purposes, we're going to seed a rudimentary in-memory DB if it hasn't been already
// Then return the value from it
if (db.get('todos')?.length === 0) {
db.set('todos', [
{
id: 1,
message: 'First todo',
},
]);
}
const todos: Todo[] = db.get('todos');
const lastId = [...todos].sort((a, b) => b.id - a.id)[0].id;
return { todos, lastId };
});
export const useAddTodo = routeAction$(
(todo: { id: string; message: string }) => {
const success = db.add('todos', {
id: parseInt(todo.id),
message: todo.message,
});
return { success };
},
zod$({ id: z.string(), message: z.string() })
(todo: { id: string; message: string }) => {
const success = db.add('todos', {
id: parseInt(todo.id),
message: todo.message,
});
return { success };
},
zod$({ id: z.string(), message: z.string() })
);
export default component$(() => {
const todoStore = useContext(TodoContext);
const persistedTodos = useGetTodos();
const addTodoAction = useAddTodo();
const todoStore = useContext(TodoContext);
const persistedTodos = useGetTodos();
const addTodoAction = useAddTodo();
useTask$(({ track }) => {
track(() => persistedTodos.value);
if (persistedTodos.value) {
todoStore.todos = persistedTodos.value.todos;
todoStore.lastId =
todoStore.lastId > persistedTodos.value.lastId
? todoStore.lastId
: persistedTodos.value.lastId;
}
});
return (
<div>
<h1>Todos</h1>
{todoStore.todos.map((t) => (
<div key={`todo-${t.id}`}>
<label>
<input type="checkbox" /> {t.message}
</label>
</div>
))}
<Form action={addTodoAction}>
<input type="hidden" name="id" value={todoStore.lastId + 1} />
<input type="text" name="message" />
<button type="submit">Add</button>
</Form>
{addTodoAction.value?.success && <p>Todo added!</p>}
</div>
);
useTask$(({ track }) => {
track(() => persistedTodos.value);
if (persistedTodos.value) {
todoStore.todos = persistedTodos.value.todos;
todoStore.lastId =
todoStore.lastId > persistedTodos.value.lastId
? todoStore.lastId
: persistedTodos.value.lastId;
}
});
return (
<div>
<h1>Todos</h1>
{todoStore.todos.map((t) => (
<div key={`todo-${t.id}`}>
<label>
<input type="checkbox" /> {t.message}
</label>
</div>
))}
<Form action={addTodoAction}>
<input type="hidden" name="id" value={todoStore.lastId + 1} />
<input type="text" name="message" />
<button type="submit">Add</button>
</Form>
{addTodoAction.value?.success && <p>Todo added!</p>}
</div>
);
});
```
@@ -495,27 +495,27 @@ To separate the logic, create a new file `libs/data-access/src/lib/todos.ts` and
import { db, Todo } from './api';
export function getTodos() {
// A network request or db connection could be made here to fetch persisted todos
// For illustrative purposes, we're going to seed a rudimentary in-memory DB if it hasn't been already
// Then return the value from it
if (db.get('todos')?.length === 0) {
db.set('todos', [
{
id: 1,
message: 'First todo',
},
]);
}
const todos: Todo[] = db.get('todos');
const lastId = [...todos].sort((a, b) => b.id - a.id)[0].id;
return { todos, lastId };
// A network request or db connection could be made here to fetch persisted todos
// For illustrative purposes, we're going to seed a rudimentary in-memory DB if it hasn't been already
// Then return the value from it
if (db.get('todos')?.length === 0) {
db.set('todos', [
{
id: 1,
message: 'First todo',
},
]);
}
const todos: Todo[] = db.get('todos');
const lastId = [...todos].sort((a, b) => b.id - a.id)[0].id;
return { todos, lastId };
}
export function addTodo(todo: { id: string; message: string }) {
const success = db.add('todos', {
id: parseInt(todo.id),
message: todo.message,
});
return { success };
const success = db.add('todos', {
id: parseInt(todo.id),
message: todo.message,
});
return { success };
}
```
@@ -532,51 +532,51 @@ Finally, lets update `apps/todo/src/routes/todo/index.tsx` to use our newly c
```tsx {% fileName="apps/todo/src/routes/todo/index.tsx" %}
import { component$, useContext, useTask$ } from '@builder.io/qwik';
import {
Form,
routeAction$,
routeLoader$,
z,
zod$,
Form,
routeAction$,
routeLoader$,
z,
zod$,
} from '@builder.io/qwik-city';
import { addTodo, getTodos, TodoContext } from '@acme/data-access';
export const useGetTodos = routeLoader$(() => getTodos());
export const useAddTodo = routeAction$(
(todo) => addTodo(todo),
zod$({ id: z.string(), message: z.string() })
(todo) => addTodo(todo),
zod$({ id: z.string(), message: z.string() })
);
export default component$(() => {
const todoStore = useContext(TodoContext);
const persistedTodos = useGetTodos();
const addTodoAction = useAddTodo();
useTask$(({ track }) => {
track(() => persistedTodos.value);
if (persistedTodos.value) {
todoStore.todos = persistedTodos.value.todos;
todoStore.lastId =
todoStore.lastId > persistedTodos.value.lastId
? todoStore.lastId
: persistedTodos.value.lastId;
}
});
return (
<div>
<h1>Todos</h1>
{todoStore.todos.map((t) => (
<div key={`todo-${t.id}`}>
<label>
<input type="checkbox" /> {t.message}
</label>
</div>
))}
<Form action={addTodoAction}>
<input type="hidden" name="id" value={todoStore.lastId + 1} />
<input type="text" name="message" />
<button type="submit">Add</button>
</Form>
{addTodoAction.value?.success && <p>Todo added!</p>}
</div>
);
const todoStore = useContext(TodoContext);
const persistedTodos = useGetTodos();
const addTodoAction = useAddTodo();
useTask$(({ track }) => {
track(() => persistedTodos.value);
if (persistedTodos.value) {
todoStore.todos = persistedTodos.value.todos;
todoStore.lastId =
todoStore.lastId > persistedTodos.value.lastId
? todoStore.lastId
: persistedTodos.value.lastId;
}
});
return (
<div>
<h1>Todos</h1>
{todoStore.todos.map((t) => (
<div key={`todo-${t.id}`}>
<label>
<input type="checkbox" /> {t.message}
</label>
</div>
))}
<Form action={addTodoAction}>
<input type="hidden" name="id" value={todoStore.lastId + 1} />
<input type="text" name="message" />
<button type="submit">Add</button>
</Form>
{addTodoAction.value?.success && <p>Todo added!</p>}
</div>
);
});
```
@@ -594,18 +594,18 @@ This journey through Qwik and Nx demonstrates how thoughtful architecture and th
## Further Reading
- [Qwik](https://qwik.dev/)
- [qwik-nx](https://github.com/qwikifiers/qwik-nx)
- [Enforce Module Boundaries](/features/enforce-module-boundaries)
- [Nx Core Concepts](/concepts)
- [Qwik](https://qwik.dev/)
- [qwik-nx](https://github.com/qwikifiers/qwik-nx)
- [Enforce Module Boundaries](/features/enforce-module-boundaries)
- [Nx Core Concepts](/concepts)
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+6 -6
View File
@@ -13,9 +13,9 @@ Victor and I are excited to announce that Nx has raised another $16M in a Series
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+92 -92
View File
@@ -38,8 +38,8 @@ Juri also highlighted the [Nx Champions](/community) program that got launched t
Finally there were also two **announcements**:
- the Nx team decided to move off Medium for a better publishing experience but mainly also to avoid the paywall, something that the team has no control over. The new blog is currently being built and will be hosted at [blog](/blog). This also allows to better resurface information by being able to integrate blog articles into the Nx docs search and make them also accessible to the Nx AI Assistant which was the 2nd announcement.
- the **Nx AI Assistant** is an experiment the team is running to use AI to improve discoverability on the Nx docs. The ChatGPT powered assistant allows to ask natural language questions and responds based on the Nx docs training data, also including links to the sources. Try it out at [ai-chat](/ai-chat) and use the feedback thumbs-up/down buttons to help improve it over time 🙏.
- the Nx team decided to move off Medium for a better publishing experience but mainly also to avoid the paywall, something that the team has no control over. The new blog is currently being built and will be hosted at [blog](/blog). This also allows to better resurface information by being able to integrate blog articles into the Nx docs search and make them also accessible to the Nx AI Assistant which was the 2nd announcement.
- the **Nx AI Assistant** is an experiment the team is running to use AI to improve discoverability on the Nx docs. The ChatGPT powered assistant allows to ask natural language questions and responds based on the Nx docs training data, also including links to the sources. Try it out at [ai-chat](/ai-chat) and use the feedback thumbs-up/down buttons to help improve it over time 🙏.
Also, Nx is open source: [https://github.com/nrwl/nx](https://github.com/nrwl/nx). Contribute! And while youre there, dont forget to give us a star 😃.
@@ -63,11 +63,11 @@ This might be manageable in a static repository setup, but monorepos introduce a
Victor critiqued that most current CI setups are:
- Oriented towards machines
- Low-level in their configuration
- Maintenance-heavy
- Detached from developer intentions
- Challenging to implement with monorepos
- Oriented towards machines
- Low-level in their configuration
- Maintenance-heavy
- Detached from developer intentions
- Challenging to implement with monorepos
The big question: how can we revolutionize CI? Victor then showcased a demo workspace and highlights where the complexity of setting up CI comes from:
@@ -75,10 +75,10 @@ The big question: how can we revolutionize CI? Victor then showcased a demo work
Even running e2e tests on CI requires:
- Building the application to be tested to produce an artifact
- That usually requires first building all libraries the app depends on, in the correct order
- Once all libraries are built, the application itself can be build
- Finally e2e can be run on the application artifact
- Building the application to be tested to produce an artifact
- That usually requires first building all libraries the app depends on, in the correct order
- Once all libraries are built, the application itself can be build
- Finally e2e can be run on the application artifact
Notice, since we want to do this as fast as possible, we want to parallelize these operations across machines. This involves also taking care of transferring build artifacts between them.
@@ -86,17 +86,17 @@ This is where **Nx Cloud Workflows** shines. It enables developers to draft CI c
```yaml
env:
NODE_OPTIONS: '--max_old_space_size=4096'
NODE_OPTIONS: '--max_old_space_size=4096'
setup:
- name: Git Checkout
uses: 'nx-cloud-steps/checkout'
- name: Npm Install
uses: 'nx-cloud-steps/npm-install'
- name: Git Checkout
uses: 'nx-cloud-steps/checkout'
- name: Npm Install
uses: 'nx-cloud-steps/npm-install'
steps:
- name: CI Checks
parallel-scripts: |
nx affected -t build e2e --parallel=1
nx affected -t test lint --parallel=3
- name: CI Checks
parallel-scripts: |
nx affected -t build e2e --parallel=1
nx affected -t test lint --parallel=3
```
This elevated abstraction is possible because Nx Cloud & Nx are intimately familiar with the workspace, understanding the interdependencies between projects and tasks.
@@ -109,9 +109,9 @@ Beyond simplifying CI configurations, Nx Cloud Workflows helps optimize computat
Victor highlighted that most current CI setups:
- Consistently utilize a predetermined number of agents, irrespective of the actual needs of the PR
- Possess non-reusable agents since each is tailored to a specific task, like building or testing
- Struggle with granular retries
- Consistently utilize a predetermined number of agents, irrespective of the actual needs of the PR
- Possess non-reusable agents since each is tailored to a specific task, like building or testing
- Struggle with granular retries
As a metaphor Victor mentions that **Nx Cloud Workflows is to CI what S3 is to file uploads.**
@@ -163,21 +163,21 @@ Windows, macOS and Linux is currently in development which will use a Cloud VM s
Michael talks about how to leverage Nx to migrate multiple repositories into a monorepo to streamline development and increase developer productivity. He goes through
- how a project gets started
- how to prep moving to a monorepo from a polyrepo situation
- how to do the move in parallel
- how to measure the progress
- how a project gets started
- how to prep moving to a monorepo from a polyrepo situation
- how to do the move in parallel
- how to measure the progress
The project usually starts with an architectural audit. That involves a detailed analysis of the underlying codebase, also including an executive summary for non technical folks. Once the audit is done, the actual move is planned and prepared. A part of that is to define “Nx migration goals”, like
- Single Version Policy
- Improved Maintenance
- Shared Infrastructure
- Shared Architecture
- Efficient Task Runs
- Frictionless Code-Sharing
- Frequent Deployments
- Decouple Deployment
- Single Version Policy
- Improved Maintenance
- Shared Infrastructure
- Shared Architecture
- Efficient Task Runs
- Frictionless Code-Sharing
- Frequent Deployments
- Decouple Deployment
To prioritize which ones to address first, Michael uses the following metaphor:
@@ -188,10 +188,10 @@ The important part here is to understand why “apples get bad” in the first p
Once the priorities are defined and roadmap laid out, the goal is to **move in parallel.**
As part of that move the following gets produced:
- Migration Guide
- Training Program
- Communication Strategy
- Impact Measurement
- Migration Guide
- Training Program
- Communication Strategy
- Impact Measurement
The migration guide defines where to start, what the company goals are, how the deliveries will be integrated into the existing process and how the interaction with the various teams will happen.
@@ -201,9 +201,9 @@ Finally the impact measurement; Nx Cloud already has graphs to measure how much
An interesting part is also how they perform the repository synching (from polyrepo to monorepo). They leverage an Nx plugin that
- contains shared build logic
- has rules to run that produce actionable feedback about what is needed to sync/align the polyrepo repository s.t. it can be merged into the monorepo
- it also allows to track progress and produce according reporting of where the company is at
- contains shared build logic
- has rules to run that produce actionable feedback about what is needed to sync/align the polyrepo repository s.t. it can be merged into the monorepo
- it also allows to track progress and produce according reporting of where the company is at
Sounds interesting? Watch the full talk below:
@@ -223,32 +223,32 @@ Craigory did a deep dive into the new Nx inference API. This is particularly int
What is project inference:
- how Nx reads your project configuration
- introduced between v13.3 and v14
- initially to support package-based monorepos which use package.json scripts rather than `project.json`. Generalizing the project config reading mechanism also allowed to define an API that community plugins can leverage and which allows to integrate even languages outside the JS ecosystem into Nx (e.g. where projects are just defined differently, such as .Net, Java, Python,..)
- how Nx reads your project configuration
- introduced between v13.3 and v14
- initially to support package-based monorepos which use package.json scripts rather than `project.json`. Generalizing the project config reading mechanism also allowed to define an API that community plugins can leverage and which allows to integrate even languages outside the JS ecosystem into Nx (e.g. where projects are just defined differently, such as .Net, Java, Python,..)
Inference API v1
- `projectFilePatterns` - identify files that represent the root of a project
- `registerProjectTargets` - takes a project file and converts to a list of targets that Nx knows how to run
- `projectFilePatterns` - identify files that represent the root of a project
- `registerProjectTargets` - takes a project file and converts to a list of targets that Nx knows how to run
Shortcomings have been
- strict 11 mapping between project files and projects
- the logic of finding proj files and targets had to be decoupled which introduced potential failure points
- no way to add dynamic metadata to a project
- strict 11 mapping between project files and projects
- the logic of finding proj files and targets had to be decoupled which introduced potential failure points
- no way to add dynamic metadata to a project
Project graph API v2
- `createNodes` - finds graph nodes based on files on disk
- `createDependencies` - finds edges to be added to the graph
- `createNodes` - finds graph nodes based on files on disk
- `createDependencies` - finds edges to be added to the graph
Still 2 parts, but theres no overlap between these two and they have very specific purposes.
`createNodes` is a tuple composed of:
- `projectFilePattern`
- `CreateNodesFunction` It can return a map of projects and external nodes, so there's no more the shortcoming of a 1-1 as it was in v1 API. With this new setup multiple plugins might detect the same project. Nx merges the configuration that has been identified. Kinda what happens right now if you mix `package.json` and `project.json` targets in an Nx workspace.
- `projectFilePattern`
- `CreateNodesFunction` It can return a map of projects and external nodes, so there's no more the shortcoming of a 1-1 as it was in v1 API. With this new setup multiple plugins might detect the same project. Nx merges the configuration that has been identified. Kinda what happens right now if you mix `package.json` and `project.json` targets in an Nx workspace.
Craigory demos the inference API by building a spell checking plugin for Nx.
@@ -256,9 +256,9 @@ Craigory demos the inference API by building a spell checking plugin for Nx.
This API is still marked as experimental, next steps will be
- mark as stable
- remove v1 API after deprecation period
- plugin authors should start looking into the new API, provide feedback and think about migration scenarios
- mark as stable
- remove v1 API after deprecation period
- plugin authors should start looking into the new API, provide feedback and think about migration scenarios
## Package-based to Integrated: One Small Step or One Giant Leap?
@@ -279,15 +279,15 @@ Currently, Nx offers support for two predominant monorepo styles: package-based
### Package-based Monorepos:
- These are tailored for flexibility and innovation.
- Packages within this setup can have diverse configurations.
- Every package boasts its individual node_modules and dependencies.
- Crucially, each can be upgraded independently, offering a high degree of autonomy.
- These are tailored for flexibility and innovation.
- Packages within this setup can have diverse configurations.
- Every package boasts its individual node_modules and dependencies.
- Crucially, each can be upgraded independently, offering a high degree of autonomy.
### Integrated Monorepos:
- These are structured to prioritize consistency and maintainability.
- Updates within this framework are automated, and the setup adheres to a single-version policy.
- These are structured to prioritize consistency and maintainability.
- Updates within this framework are automated, and the setup adheres to a single-version policy.
Isaac then drew parallels between the Apollo program and the package-based mindset. The Apollo missions were evolutionary in nature, constantly pushing the envelope and embracing innovation with each successive mission. However, this trailblazing approach wasnt without its perils, as evidenced by tragic accidents. This experimental approach was feasible because the core team, responsible for creating the setup, remained consistent throughout the projects duration.
@@ -295,12 +295,12 @@ In contrast, Isaac likened the International Space Station (ISS) to the integrat
Shifting gears, Isaac delved into a hands-on demonstration. He outlined the process of transitioning from a package-based monorepo to an integrated one, including demoing:
- Initializing Nx with `nx init`.
- Establishing new projects to facilitate type sharing across applications.
- Harnessing the power of the Nx graph visualization to navigate and understand the project structure.
- Employing the module boundary rule, ensuring constraints are maintained in the revamped structure.
- Devising a novel Nx generator, streamlining the process of setting up new libraries within the workspace.
- Finally, he showcased the seamless upgrade mechanism, ensuring the workspace is always aligned with the latest version.
- Initializing Nx with `nx init`.
- Establishing new projects to facilitate type sharing across applications.
- Harnessing the power of the Nx graph visualization to navigate and understand the project structure.
- Employing the module boundary rule, ensuring constraints are maintained in the revamped structure.
- Devising a novel Nx generator, streamlining the process of setting up new libraries within the workspace.
- Finally, he showcased the seamless upgrade mechanism, ensuring the workspace is always aligned with the latest version.
## Nxt Level Publishing
@@ -317,9 +317,9 @@ The nx core team decided to go into this problem space and provide an opinionate
New command `nx release`
- `nx release version` to determine and apply version updates
- `nx release` changelog generate a CHANGELOG.md file and optional GitHub releases based on git commits
- `nx release` publish takes a newly versioned project and publishes them to a remote registry (e.g. NPM)
- `nx release version` to determine and apply version updates
- `nx release` changelog generate a CHANGELOG.md file and optional GitHub releases based on git commits
- `nx release` publish takes a newly versioned project and publishes them to a remote registry (e.g. NPM)
This new command is not tight to `package.json` files but is general purpose; clearly publishing JS/TS packages is the main use case right now in Nx
Important to note that all the existing plugins are still valid and will still be going forward.
@@ -337,9 +337,9 @@ The monorepo has a `pkg-a` and `pkg-b` where there's a relationship between them
If the `version` command is used in such scenario, it will also be applied to the dependent packages (`pkg-b`) since Nx knows about the dependencies via the project graph.
A nice feature is also that the changelog will...
- automatically group first by type (e.g. features grouped together, fixes etc)
- within each type grouping it will be grouped by scope such as pkg-a etc which will be alphabetized
- if theres a fix on the entire repo thatll come first before the per-package changes
- automatically group first by type (e.g. features grouped together, fixes etc)
- within each type grouping it will be grouped by scope such as pkg-a etc which will be alphabetized
- if theres a fix on the entire repo thatll come first before the per-package changes
`nx release changelog --create-release=github` allows to also automatically push the changelog to a Github release.
@@ -347,9 +347,9 @@ When running `nx release publish`, Nx also takes into account the right order of
Future roadmap:
- ability to customize how the release works by defining it in `nx.json`
- “release groups” will allow to group packages and define whether versions should be in sync or versioned independently; filter by projects, or even just publish a subset of projects of a workspace
- publishing also automatically takes into account the provenance data on NPM
- ability to customize how the release works by defining it in `nx.json`
- “release groups” will allow to group packages and define whether versions should be in sync or versioned independently; filter by projects, or even just publish a subset of projects of a workspace
- publishing also automatically takes into account the provenance data on NPM
## Lightning Talk: What if your stories were — already — your e2e tests?
@@ -423,9 +423,9 @@ The comparative analysis of their DIY solution versus DTE revealed roughly equiv
### Adrians Key Insights:
- DTE setup warrants a dual-pronged strategy: an immediate plan for initiation and a long-term vision for transition. Notably, Nx DTE supports incremental adoption.
- Patience is paramount during the tuning phase to determine the optimal number of agents.
- While results might vary, Adrian humorously assures that one can always bank on the Nx team for support. 😅
- DTE setup warrants a dual-pronged strategy: an immediate plan for initiation and a long-term vision for transition. Notably, Nx DTE supports incremental adoption.
- Patience is paramount during the tuning phase to determine the optimal number of agents.
- While results might vary, Adrian humorously assures that one can always bank on the Nx team for support. 😅
## Vanquishing Deployment Dragons with Nx wizardry
@@ -456,11 +456,11 @@ Nx plays a crucial role in helping integrate and maintain these different tools:
How? Brandon dives straight into it by explaining how Nx plugins in particular can be useful, explaining:
- features of Nx plugins such as generators, executors, automated migrations, presets and how to use them just locally to automate your workspace
- how to create a new plugin
- the anatomy of a generator and how they can be useful in scaffolding new setups, but also integrating technology, like adding tRPC to your stack, etc.
- similarly Nx executors provide a thin abstraction layer over the actual commands, allowing the plugin developer to update the underlying tooling without necessarily disrupting the end user
- most importantly allowing to write automatic migrations he can leverage with Analog, like running `nx migrate @analogjs/platform@latest` to update a given workspace automatically to the latest version, across potentially breaking changes
- features of Nx plugins such as generators, executors, automated migrations, presets and how to use them just locally to automate your workspace
- how to create a new plugin
- the anatomy of a generator and how they can be useful in scaffolding new setups, but also integrating technology, like adding tRPC to your stack, etc.
- similarly Nx executors provide a thin abstraction layer over the actual commands, allowing the plugin developer to update the underlying tooling without necessarily disrupting the end user
- most importantly allowing to write automatic migrations he can leverage with Analog, like running `nx migrate @analogjs/platform@latest` to update a given workspace automatically to the latest version, across potentially breaking changes
Brandon highlighted a pivotal aspect for OSS package/framework authors: the power to not just assimilate into pre-existing Nx workspaces via custom Nx plugins but also to steer the entire workspace setup process. This is particularly beneficial when tailored setups specific to individual use cases are required. By leveraging an [Nx preset](/extending-nx/recipes/create-preset), one can achieve this tailored configuration. Brandon also touched upon the possibility of advancing further by constructing an [install package](/extending-nx/recipes/create-install-package) through Nx.
@@ -490,9 +490,9 @@ If you enjoyed these, [subscribe to our YouTube channel](https://www.youtube.com
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+36 -36
View File
@@ -12,18 +12,18 @@ This article will cover the main things you need to know to get the most out of
Heres a Table of Contents so you can skip straight to the updates you care about the most:
- [It's a Vue-tiful Day for Nx](#its-a-vuetiful-day-for-nx)
- [Enhancements to Module Federation Support](#enhancements-to-module-federation-support)
- [More Consistent Generator Paths](#more-consistent-generator-paths)
- [The NEW Nx AI Chatbot](#the-new-nx-ai-chatbot)
- [More Seamless Integration With Nx Cloud](#more-seamless-integration-with-nx-cloud)
- [`nx.json` Simplification](#simplification)
- [Nx Repo Begins Dog-Fooding Nx Workflows](#nx-repo-dogfooding-nx-workflows)
- [Task Graphing Improvements](#task-graphing-improvements)
- [`@nx/linter` Renames to `@nx/eslint`](#renamed-to)
- [New Experimental Feature: Nx Release](#new-experimental-feature-nx-release)
- [Experimental: Nx Project Inference API v2](#experimental-nx-project-inference-api-v2)
- [20k Github Stars!!](#20k-github-stars)
- [It's a Vue-tiful Day for Nx](#its-a-vuetiful-day-for-nx)
- [Enhancements to Module Federation Support](#enhancements-to-module-federation-support)
- [More Consistent Generator Paths](#more-consistent-generator-paths)
- [The NEW Nx AI Chatbot](#the-new-nx-ai-chatbot)
- [More Seamless Integration With Nx Cloud](#more-seamless-integration-with-nx-cloud)
- [`nx.json` Simplification](#simplification)
- [Nx Repo Begins Dog-Fooding Nx Workflows](#nx-repo-dogfooding-nx-workflows)
- [Task Graphing Improvements](#task-graphing-improvements)
- [`@nx/linter` Renames to `@nx/eslint`](#renamed-to)
- [New Experimental Feature: Nx Release](#new-experimental-feature-nx-release)
- [Experimental: Nx Project Inference API v2](#experimental-nx-project-inference-api-v2)
- [20k Github Stars!!](#20k-github-stars)
**Prefer a video?**
@@ -91,21 +91,21 @@ Then, when consuming this library, you can use the `shared` method of the `Modul
import { ModuleFederationConfig } from '@nx/webpack';
const config: ModuleFederationConfig = {
name: 'my-remote',
exposes: {
'./Module': 'apps/my-remote/src/app/remote-entry/entry.module.ts',
},
remotes: ['federated-is-odd'],
shared: (libName, configuration) => {
if (libName === 'is-odd') {
return {
singleton: true,
strictVersion: true,
requiredVersion: '0.0.1',
};
}
return configuration;
},
name: 'my-remote',
exposes: {
'./Module': 'apps/my-remote/src/app/remote-entry/entry.module.ts',
},
remotes: ['federated-is-odd'],
shared: (libName, configuration) => {
if (libName === 'is-odd') {
return {
singleton: true,
strictVersion: true,
requiredVersion: '0.0.1',
};
}
return configuration;
},
};
export default config;
@@ -223,9 +223,9 @@ In Nx 17, we removed any remaining traces of `tslint` from our linter package, s
`nx release` is a new top level command on the Nx CLI which is designed to help you with versioning, changelog generation, and publishing of your projects:
- `nx release version` - Determine and apply version updates to projects and their dependents
- `nx release changelog` - Generate CHANGELOG.md files and optional Github releases based on git commits
- `nx release publish` - Take the freshly versioned projects and publish them to a remote registry
- `nx release version` - Determine and apply version updates to projects and their dependents
- `nx release changelog` - Generate CHANGELOG.md files and optional Github releases based on git commits
- `nx release publish` - Take the freshly versioned projects and publish them to a remote registry
`nx release` is still experiment and therefore subject to change, but the Nx repo itself is now using these commands to version itself, as well as generate changelogs, [Github releases](https://github.com/nrwl/nx/releases/tag/17.0.3), and publish our packages to npm.
@@ -279,9 +279,9 @@ Thats all for now folks! Were just starting up a new iteration of developm
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+149 -149
View File
@@ -10,9 +10,9 @@ There are currently countless numbers of state management libraries out there. T
This blog will show:
- How to set up these libraries and their dev tools
- How to build the sample page below in React Native / Expo with state management
- How to do unit testing
- How to set up these libraries and their dev tools
- How to build the sample page below in React Native / Expo with state management
- How to do unit testing
It will call an API and show a cat fact on the page, allowing users to like or dislike the data.
@@ -26,29 +26,29 @@ Github repo: [https://github.com/xiongemi/nx-expo-monorepo](https://github.com/x
From [TanStack Query documentation](https://tanstack.com/query/latest/docs/framework/react/guides/does-this-replace-client-state), it says:
- [TanStack Query](https://tanstack.com/query/latest/docs/framework/react/overview) is a **server-state** library.
- [Redux](https://redux.js.org/) is a client-state library.
- [TanStack Query](https://tanstack.com/query/latest/docs/framework/react/overview) is a **server-state** library.
- [Redux](https://redux.js.org/) is a client-state library.
What is the difference between the server state and the client state?
In short:
- Calling an API, dealing with asynchronous data-> server state
- Everything else about UI, dealing with synchronous data -> client state
- Calling an API, dealing with asynchronous data-> server state
- Everything else about UI, dealing with synchronous data -> client state
## Installation
To use **[TanStack Query / React Query](https://tanstack.com/query/latest)** for the server state, I need to install:
- Library: [@tanstack/react-query](https://tanstack.com/query/latest)
- Dev tools: [@tanstack/react-query-devtools](https://tanstack.com/query/latest/docs/framework/react/devtools)
- Library: [@tanstack/react-query](https://tanstack.com/query/latest)
- Dev tools: [@tanstack/react-query-devtools](https://tanstack.com/query/latest/docs/framework/react/devtools)
I will use **Redux** for everything else.
- Library: [redux](https://github.com/reduxjs/redux), react-redux, @reduxjs/toolkit
- Dev tools: [@redux-devtools/extension](https://github.com/zalmoxisus/redux-devtools-extension)
- Logger: [redux-logger](https://github.com/LogRocket/redux-logger), [@types/redux-logger](https://www.npmjs.com/package/@types/redux-logger)
- Storage: [redux-persist](https://github.com/rt2zz/redux-persist), [@react-native-async-storage/async-storage](https://github.com/react-native-async-storage/async-storage)
- Library: [redux](https://github.com/reduxjs/redux), react-redux, @reduxjs/toolkit
- Dev tools: [@redux-devtools/extension](https://github.com/zalmoxisus/redux-devtools-extension)
- Logger: [redux-logger](https://github.com/LogRocket/redux-logger), [@types/redux-logger](https://www.npmjs.com/package/@types/redux-logger)
- Storage: [redux-persist](https://github.com/rt2zz/redux-persist), [@react-native-async-storage/async-storage](https://github.com/react-native-async-storage/async-storage)
To install all the above packages:
@@ -76,13 +76,13 @@ import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import { Platform } from 'react-native';
const App = () => {
const queryClient = new QueryClient();
return (
<QueryClientProvider client={queryClient}>
{Platform.OS === 'web' && <ReactQueryDevtools />}
...
</QueryClientProvider>
);
const queryClient = new QueryClient();
return (
<QueryClientProvider client={queryClient}>
{Platform.OS === 'web' && <ReactQueryDevtools />}
...
</QueryClientProvider>
);
};
export default App;
@@ -130,17 +130,17 @@ For this app, lets use this API: [https://catfact.ninja/](https://catfact.nin
import { useQuery } from '@tanstack/react-query';
export const fetchCatFact = async (): Promise<string> => {
const response = await fetch('https://catfact.ninja/fact');
const data = await response.json();
return data.fact;
const response = await fetch('https://catfact.ninja/fact');
const data = await response.json();
return data.fact;
};
export const useCatFact = () => {
return useQuery({
queryKey: ['cat-fact'],
queryFn: fetchCatFact,
enabled: false,
});
return useQuery({
queryKey: ['cat-fact'],
queryFn: fetchCatFact,
enabled: false,
});
};
```
@@ -164,8 +164,8 @@ To solve this, you need to wrap your component inside the renderHook function fr
Depending on which library you use to make HTTP requests. (e.g. fetch, axios), you need to install a library to mock the response.
- If you use `fetch` to fetch data, you need to install `jest*fetch-mock`.
- If you use `axios` to fetch data, you need to install `axio*-mock-adapter`.
- If you use `fetch` to fetch data, you need to install `jest*fetch-mock`.
- If you use `axios` to fetch data, you need to install `axio*-mock-adapter`.
For this example, since it uses `fetch`, you need to install `jest-fetch-mock`:
@@ -214,14 +214,14 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import React from 'react';
export interface TestWrapperProps {
children: React.ReactNode;
children: React.ReactNode;
}
export function TestWrapper({ children }: TestWrapperProps) {
const queryClient = new QueryClient();
return (
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
);
const queryClient = new QueryClient();
return (
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
);
}
export default TestWrapper;
@@ -238,41 +238,41 @@ import { useCatFact } from './use-cat-fact';
import fetchMock from 'jest-fetch-mock';
describe('useCatFact', () => {
afterEach(() => {
jest.resetAllMocks();
});
afterEach(() => {
jest.resetAllMocks();
});
it('status should be success', async () => {
// simulating a server response
fetchMock.mockResponseOnce(
JSON.stringify({
fact: 'random cat fact',
})
);
it('status should be success', async () => {
// simulating a server response
fetchMock.mockResponseOnce(
JSON.stringify({
fact: 'random cat fact',
})
);
const { result } = renderHook(() => useCatFact(), {
wrapper: TestWrapper,
});
result.current.refetch(); // refetching the query
expect(result.current.isLoading).toBeTruthy();
const { result } = renderHook(() => useCatFact(), {
wrapper: TestWrapper,
});
result.current.refetch(); // refetching the query
expect(result.current.isLoading).toBeTruthy();
await waitFor(() => expect(result.current.isLoading).toBe(false));
expect(result.current.isSuccess).toBe(true);
expect(result.current.data).toEqual('random cat fact');
});
await waitFor(() => expect(result.current.isLoading).toBe(false));
expect(result.current.isSuccess).toBe(true);
expect(result.current.data).toEqual('random cat fact');
});
it('status should be error', async () => {
fetchMock.mockRejectOnce();
it('status should be error', async () => {
fetchMock.mockRejectOnce();
const { result } = renderHook(() => useCatFact(), {
wrapper: TestWrapper,
});
result.current.refetch(); // refetching the query
expect(result.current.isLoading).toBeTruthy();
const { result } = renderHook(() => useCatFact(), {
wrapper: TestWrapper,
});
result.current.refetch(); // refetching the query
expect(result.current.isLoading).toBeTruthy();
await waitFor(() => expect(result.current.isLoading).toBe(false));
expect(result.current.isError).toBe(true);
});
await waitFor(() => expect(result.current.isLoading).toBe(false));
expect(result.current.isError).toBe(true);
});
});
```
@@ -290,39 +290,39 @@ import MockAdapter from 'axios-mock-adapter';
const mockAxios = new MockAdapter(axios);
describe('useCatFact', () => {
afterEach(() => {
mockAxios.reset();
});
afterEach(() => {
mockAxios.reset();
});
it('status should be success', async () => {
// simulating a server response
mockAxios.onGet().replyOnce(200, {
fact: 'random cat fact',
});
it('status should be success', async () => {
// simulating a server response
mockAxios.onGet().replyOnce(200, {
fact: 'random cat fact',
});
const { result } = renderHook(() => useCatFact(), {
wrapper: TestWrapper,
});
result.current.refetch(); // refetching the query
expect(result.current.isLoading).toBeTruthy();
const { result } = renderHook(() => useCatFact(), {
wrapper: TestWrapper,
});
result.current.refetch(); // refetching the query
expect(result.current.isLoading).toBeTruthy();
await waitFor(() => expect(result.current.isLoading).toBe(false));
expect(result.current.isSuccess).toBe(true);
expect(result.current.data).toEqual('random cat fact');
});
await waitFor(() => expect(result.current.isLoading).toBe(false));
expect(result.current.isSuccess).toBe(true);
expect(result.current.data).toEqual('random cat fact');
});
it('status should be error', async () => {
mockAxios.onGet().replyOnce(500);
it('status should be error', async () => {
mockAxios.onGet().replyOnce(500);
const { result } = renderHook(() => useCatFact(), {
wrapper: TestWrapper,
});
result.current.refetch(); // refetching the query
expect(result.current.isLoading).toBeTruthy();
const { result } = renderHook(() => useCatFact(), {
wrapper: TestWrapper,
});
result.current.refetch(); // refetching the query
expect(result.current.isLoading).toBeTruthy();
await waitFor(() => expect(result.current.isLoading).toBe(false));
expect(result.current.isError).toBe(true);
});
await waitFor(() => expect(result.current.isLoading).toBe(false));
expect(result.current.isError).toBe(true);
});
});
```
@@ -341,9 +341,9 @@ Now you run the test command `nx test queries-use-cat-fact`, it should pass:
Currently `userQuery` returns the following properties:
- `isLoading` or `status === 'loading'` - The query has no data yet
- `isError` or `status === 'error'` - The query encountered an error
- `isSuccess` or `status === 'success'` - The query was successful and data is available
- `isLoading` or `status === 'loading'` - The query has no data yet
- `isError` or `status === 'error'` - The query encountered an error
- `isSuccess` or `status === 'success'` - The query was successful and data is available
Now with components controlled by the server state, you can leverage the above properties and change your component to follow the below pattern:
@@ -446,18 +446,18 @@ Then update the redux slice at `libs/states/cat/src/lib/likes/likes.slice.ts`:
```ts
import {
createEntityAdapter,
createSelector,
createSlice,
EntityState,
createEntityAdapter,
createSelector,
createSlice,
EntityState,
} from '@reduxjs/toolkit';
export const LIKES_FEATURE_KEY = 'likes';
export interface LikesEntity {
id: string;
content: string;
dateAdded: number;
id: string;
content: string;
dateAdded: number;
}
export type LikesState = EntityState<LikesEntity>;
@@ -467,13 +467,13 @@ export const likesAdapter = createEntityAdapter<LikesEntity>();
export const initialLikesState: LikesState = likesAdapter.getInitialState();
export const likesSlice = createSlice({
name: LIKES_FEATURE_KEY,
initialState: initialLikesState,
reducers: {
like: likesAdapter.addOne,
remove: likesAdapter.removeOne,
clear: likesAdapter.removeAll,
},
name: LIKES_FEATURE_KEY,
initialState: initialLikesState,
reducers: {
like: likesAdapter.addOne,
remove: likesAdapter.removeOne,
clear: likesAdapter.removeAll,
},
});
/*
@@ -486,13 +486,13 @@ export const likesActions = likesSlice.actions;
const { selectAll } = likesAdapter.getSelectors();
const getlikesState = <ROOT extends { likes: LikesState }>(
rootState: ROOT
rootState: ROOT
): LikesState => rootState[LIKES_FEATURE_KEY];
const selectAllLikes = createSelector(getlikesState, selectAll);
export const likesSelectors = {
selectAllLikes,
selectAllLikes,
};
```
@@ -500,17 +500,17 @@ Every time the “like” button gets clicked, you want to store the content of
```ts
export interface LikesEntity {
id: string;
content: string;
dateAdded: number;
id: string;
content: string;
dateAdded: number;
}
```
This state has 3 actions:
- like: when users click like
- remove: when users cancel the like
- clear: when users clear all the likes
- like: when users click like
- remove: when users cancel the like
- clear: when users clear all the likes
### Root Store
@@ -524,33 +524,33 @@ Then you have to add the root store and create a transform function to stringify
Then in `apps/cats/src/app/App.tsx`, you have to:
- wrap the app inside the `StoreProvider` with the root store to connect with the Redux state.
- wrap the app inside `PersistGate` to persist the redux state in the storage
- wrap the app inside the `StoreProvider` with the root store to connect with the Redux state.
- wrap the app inside `PersistGate` to persist the redux state in the storage
```tsx
import React from 'react';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { PersistGate } from 'redux-persist/integration/react';
import {
createRootStore,
transformEntityStateToPersist,
createRootStore,
transformEntityStateToPersist,
} from '@nx-expo-monorepo/states/cat';
import { Loading } from '@nx-expo-monorepo/ui';
import { Provider as StoreProvider } from 'react-redux';
const App = () => {
const persistConfig = {
key: 'root',
storage: AsyncStorage,
transforms: [transformEntityStateToPersist],
};
const { store, persistor } = createRootStore(persistConfig);
const persistConfig = {
key: 'root',
storage: AsyncStorage,
transforms: [transformEntityStateToPersist],
};
const { store, persistor } = createRootStore(persistConfig);
return (
<PersistGate loading={<Loading />} persistor={persistor}>
<StoreProvider store={store}>...</StoreProvider>
</PersistGate>
);
return (
<PersistGate loading={<Loading />} persistor={persistor}>
<StoreProvider store={store}>...</StoreProvider>
</PersistGate>
);
};
export default App;
@@ -560,20 +560,20 @@ In your component where the like button is located, you need to dispatch the lik
```ts
import {
likesActions,
LikesEntity,
RootState,
likesActions,
LikesEntity,
RootState,
} from '@nx-expo-monorepo/states/cat';
import { AnyAction, ThunkDispatch } from '@reduxjs/toolkit';
const mapDispatchToProps = (
dispatch: ThunkDispatch<RootState, void, AnyAction>
dispatch: ThunkDispatch<RootState, void, AnyAction>
) => {
return {
like(item: LikesEntity) {
dispatch(likesActions.like(item));
},
};
return {
like(item: LikesEntity) {
dispatch(likesActions.like(item));
},
};
};
type mapDispatchToPropsType = ReturnType<typeof mapDispatchToProps>;
@@ -608,17 +608,17 @@ Here is a simple app that uses TanStack Query and Redux for state management. Th
Nx is a powerful monorepo tool. Together with Nx and these 2 state management tools, it will be very easy to scale up any app.
- TanStack Query site: [https://tanstack.com/query/latest](https://tanstack.com/query/latest)
- Official @nx/expo plugin: [/nx-api/expo](/nx-api/expo)
- Official @nx/react-native plugin: [/nx-api/react-native](/nx-api/react-native)
- TanStack Query site: [https://tanstack.com/query/latest](https://tanstack.com/query/latest)
- Official @nx/expo plugin: [/nx-api/expo](/nx-api/expo)
- Official @nx/react-native plugin: [/nx-api/react-native](/nx-api/react-native)
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+47 -47
View File
@@ -50,24 +50,24 @@ This part is copied from: [https://github.com/supabase-community/nextjs-openai-d
```js
export function processMdxForSearch(content: string) {
// …
const mdTree = fromMarkdown(content, {});
const sectionTrees = splitTreeBy(mdTree, (node) => node.type === 'heading');
// …
const sections = sectionTrees.map((tree: any) => {
const [firstNode] = tree.children;
const heading =
firstNode.type === 'heading' ? toString(firstNode) : undefined;
return {
content: toMarkdown(tree),
heading,
slug,
};
});
return {
checksum,
sections,
};
// …
const mdTree = fromMarkdown(content, {});
const sectionTrees = splitTreeBy(mdTree, (node) => node.type === 'heading');
// …
const sections = sectionTrees.map((tree: any) => {
const [firstNode] = tree.children;
const heading =
firstNode.type === 'heading' ? toString(firstNode) : undefined;
return {
content: toMarkdown(tree),
heading,
slug,
};
});
return {
checksum,
sections,
};
}
```
@@ -79,8 +79,8 @@ Ref in the code: [https://github.com/nrwl/nx/blob/76306f0bedc1297b64da6e58b4f7b9
```js
const embeddingResponse = await openai.embeddings.create({
model: 'text-embedding-ada-002',
input,
model: 'text-embedding-ada-002',
input,
});
```
@@ -96,17 +96,17 @@ Ref in code: [https://github.com/nrwl/nx/blob/master/tools/documentation/create-
```js
const { data: pageSection } = await supabaseClient
.from('nods_page_section')
.insert({
page_id: page.id,
slug,
heading,
longer_heading,
content,
url_partial,
token_count,
embedding,
}); // …
.from('nods_page_section')
.insert({
page_id: page.id,
slug,
heading,
longer_heading,
content,
url_partial,
token_count,
embedding,
}); // …
```
## Step 2: User query analysis and search
@@ -117,10 +117,10 @@ Ref in code: [https://github.com/nrwl/nx/blob/76306f0bedc1297b64da6e58b4f7b9c397
```js
const embeddingResponse: OpenAI.Embeddings.CreateEmbeddingResponse =
await openai.embeddings.create({
model: 'text-embedding-ada-002',
input: sanitizedQuery + getLastAssistantMessageContent(messages),
});
await openai.embeddings.create({
model: 'text-embedding-ada-002',
input: sanitizedQuery + getLastAssistantMessageContent(messages),
});
```
The assistant compares the query embedding with these documentation embeddings to identify relevant sections. This comparison is essentially measuring how close the querys vector is to the documentation vectors. The closer they are, the more related the content. The way this works is that it sends the users question embedding to Supabase, to a PostgreSQL function, which runs a vector comparison between the users question embedding and the stored embeddings in the table. The PostgreSQL function returns all the similar documentation chunks.
@@ -131,8 +131,8 @@ Ref in code: [https://github.com/nrwl/nx/blob/76306f0bedc1297b64da6e58b4f7b9c397
```js
const { data: pageSections } = await supabaseClient.rpc('match_page_sections', {
embedding,
// …
embedding,
// …
});
```
@@ -142,10 +142,10 @@ With the relevant sections (documentation chunks) identified and retrieved, GPT
This approach the AI is instructed to use (in the **prompt**) is the following:
- Identify CLUES from the query and documentation.
- Deduce REASONING based solely on the provided Nx Documentation.
- EVALUATE its reasoning, ensuring alignment with Nx Documentation.
- Rely on previous messages for contextual continuity.
- Identify CLUES from the query and documentation.
- Deduce REASONING based solely on the provided Nx Documentation.
- EVALUATE its reasoning, ensuring alignment with Nx Documentation.
- Rely on previous messages for contextual continuity.
### Ensuring Quality
@@ -307,9 +307,9 @@ This role, in the context of OpenAIs chat models, is the response of the AI.
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+44 -44
View File
@@ -8,8 +8,8 @@ tags: [nx, unit testing]
In my latest [blog](https://dev.to/nx/step-by-step-guide-to-creating-an-expo-monorepo-with-nx-3b17), I successfully navigated through the steps of setting up an Expo Monorepo with [Nx](). The next challenge? Testing! This blog dives into:
- Crafting effective unit tests for Expo components utilizing Jest
- Addressing common issues encountered during unit testing
- Crafting effective unit tests for Expo components utilizing Jest
- Addressing common issues encountered during unit testing
Repo:
{% github-repository url="https://github.com/xiongemi/nx-expo-monorepo" /%}
@@ -18,9 +18,9 @@ Repo:
Heres my setup
- Testing framework: [jest](https://jestjs.io/)
- Testing library: [@testing-library/react-native](https://callstack.github.io/react-native-testing-library/)
- Jest Preset: [jest-expo](https://www.npmjs.com/package/jest-expo)
- Testing framework: [jest](https://jestjs.io/)
- Testing library: [@testing-library/react-native](https://callstack.github.io/react-native-testing-library/)
- Jest Preset: [jest-expo](https://www.npmjs.com/package/jest-expo)
## Writing and Running Unit Tests
@@ -33,10 +33,10 @@ import React from 'react';
import Loading from './loading';
describe('Loading', () => {
it('should render successfully', () => {
const { root } = render(<Loading />);
expect(root).toBeTruthy();
});
it('should render successfully', () => {
const { root } = render(<Loading />);
expect(root).toBeTruthy();
});
});
```
@@ -99,7 +99,7 @@ In the apps test-setup.ts file, add the below lines:
```typescript
jest.mock('@react-native-async-storage/async-storage', () =>
require('@react-native-async-storage/async-storage/jest/async-storage-mock')
require('@react-native-async-storage/async-storage/jest/async-storage-mock')
);
```
@@ -196,14 +196,14 @@ To solve this, I can just mock the `useQuery` function:
import * as ReactQuery from '@tanstack/react-query';
jest.spyOn(ReactQuery, 'useQuery').mockImplementation(
jest.fn().mockReturnValue({
data: 'random cat fact',
isLoading: false,
isSuccess: true,
refetch: jest.fn(),
isFetching: false,
isError: false,
})
jest.fn().mockReturnValue({
data: 'random cat fact',
isLoading: false,
isSuccess: true,
refetch: jest.fn(),
isFetching: false,
isError: false,
})
);
```
@@ -219,18 +219,18 @@ The fix this, I need to mock the `@react-nativgation/native` library. In the app
```typescript
jest.mock('@react-navigation/native', () => {
return {
useNavigation: () => ({
navigate: jest.fn(),
dispatch: jest.fn(),
setOptions: jest.fn(),
}),
useRoute: () => ({
params: {
id: '123',
},
}),
};
return {
useNavigation: () => ({
navigate: jest.fn(),
dispatch: jest.fn(),
setOptions: jest.fn(),
}),
useRoute: () => ({
params: {
id: '123',
},
}),
};
});
```
@@ -256,9 +256,9 @@ In the apps `jest.config.ts`, there should be an option called `moduleNameMap
```typescript
module.exports = {
moduleNameMapper: {
uuid: require.resolve('uuid'),
},
moduleNameMapper: {
uuid: require.resolve('uuid'),
},
};
```
@@ -268,9 +268,9 @@ Alternatively, I can also mock this library in the test files:
import { v4 as uuidv4 } from 'uuid';
jest.mock('uuid', () => {
return {
v4: jest.fn(() => 1),
};
return {
v4: jest.fn(() => 1),
};
});
```
@@ -317,8 +317,8 @@ transformIgnorePatterns: \[
If I have an error related to a library with an unexpected token, I need to check whether they are compiled or not.
- If this library source files are already transformed to `.js`, then its name should match regex, so it would be ignored, so it will NOT be transformed.
- If this library source files are NOT transformed to `.js` (e.g. still in `.ts` or `.tsx`), then its name should NOT match regex, so it will be transformed.
- If this library source files are already transformed to `.js`, then its name should match regex, so it would be ignored, so it will NOT be transformed.
- If this library source files are NOT transformed to `.js` (e.g. still in `.ts` or `.tsx`), then its name should NOT match regex, so it will be transformed.
## Summary
@@ -328,9 +328,9 @@ With Nx, you do not need to explicitly install any testing library, so you can d
## Learn more
- [Add Cypress, Playwright, and Storybook to Nx Expo Apps](https://medium.com/@emilyxiong/add-cypress-playwright-and-storybook-to-nx-expo-apps-1d3e409ce834)
- 🧠 [Nx Docs](/getting-started/intro)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Community Discord](https://go.nx.dev/community)
- 📹 [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- 🚀 [Speed up your CI](https://nx.app/)
- [Add Cypress, Playwright, and Storybook to Nx Expo Apps](https://medium.com/@emilyxiong/add-cypress-playwright-and-storybook-to-nx-expo-apps-1d3e409ce834)
- 🧠 [Nx Docs](/getting-started/intro)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Community Discord](https://go.nx.dev/community)
- 📹 [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- 🚀 [Speed up your CI](https://nx.app/)
+27 -27
View File
@@ -8,16 +8,16 @@ tags: [nx, changelog, release]
Its been a bit since we launched [Nx 17](/blog/nx-17-release)! In this article, well go over some of the new developments and improvements that have landed in Nx 17.2:
- [Nx Closes In On 4 Million Weekly NPM Downloads!!](#nx-closes-in-on-4-million-weekly-npm-downloads)
- [New Simplified Project Configuration On the Way](#new-simplified-project-configuration-on-the-way)
- [Rust for Speed, Typescript for Extensibility](#rust-for-speed-typescript-for-extensibility)
- [Module Federation Updates](#module-federation-updates)
- [Nx Release Updates](#nx-release-updates)
- [Angular 17 (AND NgRx 17) Support](#angular-17-and-ngrx-17-support)
- [Smart Monorepos — Fast CI](#smart-monorepos-fast-ci)
- [New Canary Releases](#new-canary-releases)
- [Upcoming Release Livestream](#upcoming-release-livestream)
- [Automatically Update Nx](#automatically-update-nx)
- [Nx Closes In On 4 Million Weekly NPM Downloads!!](#nx-closes-in-on-4-million-weekly-npm-downloads)
- [New Simplified Project Configuration On the Way](#new-simplified-project-configuration-on-the-way)
- [Rust for Speed, Typescript for Extensibility](#rust-for-speed-typescript-for-extensibility)
- [Module Federation Updates](#module-federation-updates)
- [Nx Release Updates](#nx-release-updates)
- [Angular 17 (AND NgRx 17) Support](#angular-17-and-ngrx-17-support)
- [Smart Monorepos — Fast CI](#smart-monorepos-fast-ci)
- [New Canary Releases](#new-canary-releases)
- [Upcoming Release Livestream](#upcoming-release-livestream)
- [Automatically Update Nx](#automatically-update-nx)
## Nx Closes In On 4 Million Weekly NPM Downloads!!
@@ -37,8 +37,8 @@ Using Nx at that level is definitely useful as you get intelligent parallelizati
This is something thats gonna change drastically in 2024. And weve layed the first cornerstone for that. But it is behind a feature flag still as were streamlining the last bits. The goal?
- Going almost configuration-less (good defaults, you customize when you need to)
- Allowing easy drop-in of Nx plugins into existing workspaces (provides immediate productivity gains, but stays out of your way)
- Going almost configuration-less (good defaults, you customize when you need to)
- Allowing easy drop-in of Nx plugins into existing workspaces (provides immediate productivity gains, but stays out of your way)
This opens up a series of possibilities which were already super excited about. Youll hear more about this in the new year ;)
@@ -86,15 +86,15 @@ To give you full flexibility, in 17.2, weve added a programmatic API, which w
import { releaseChangelog, releasePublish, releaseVersion } from 'nx/release';
(async () => {
const { workspaceVersion, projectsVersionData } = await releaseVersion({
specifier: 'minor',
});
await releaseChangelog({
versionData: projectsVersionData,
version: workspaceVersion,
});
await releasePublish();
process.exit(0);
const { workspaceVersion, projectsVersionData } = await releaseVersion({
specifier: 'minor',
});
await releaseChangelog({
versionData: projectsVersionData,
version: workspaceVersion,
});
await releasePublish();
process.exit(0);
})();
```
@@ -207,9 +207,9 @@ Thats all for now folks! Were just starting up a new iteration of developm
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+39 -39
View File
@@ -10,25 +10,25 @@ It is that time again: getting flooded by Year of Review blog posts. We did it l
**Table of Contents**
- [Top 10 Nx Highlights of 2023](#top-10-nx-highlights-of-2023)
- [TypeScript for Extensibility — Rust for Speed](#typescript-for-extensibility-rust-for-speed)
- [First Class Vite Support](#first-class-vite-support)
- [Nxt Level Publishing](#nxt-level-publishing)
- [Improved Node Backend Development: Fastify and Docker](#improved-node-backend-development-fastify-and-docker)
- [Nx Console support for IntelliJ](#nx-console-support-for-intellij)
- [Playwright for e2e testing](#playwright-for-e2e-testing)
- [TypeScript Packaging and Batch Mode](#typescript-packaging-and-batch-mode)
- [Nx team maintained Vue plugin](#nx-team-maintained-vue-plugin)
- [Extending Nx: Local Generators, Build your Own CLI, Verdaccio Support](#extending-nx-local-generators-build-your-own-cli-verdaccio-support)
- [Module Federation](#module-federation)
- [Many OSS repos adopt Nx](#many-oss-repos-adopt-nx)
- [Nx Community](#nx-community)
- [New Content & Improved Docs](#new-content-improved-docs)
- [New Tagline: Smart Monorepos — Fast CI](#new-tagline-smart-monorepos-fast-ci)
- [Nx Conf](#nx-conf)
- [Looking ahead — 2024](#looking-ahead-2024)
- [Solving CI](#solving-ci)
- [Solving the Simplicity vs Power Dilemma](#solving-the-simplicity-vs-power-dilemma)
- [Top 10 Nx Highlights of 2023](#top-10-nx-highlights-of-2023)
- [TypeScript for Extensibility — Rust for Speed](#typescript-for-extensibility-rust-for-speed)
- [First Class Vite Support](#first-class-vite-support)
- [Nxt Level Publishing](#nxt-level-publishing)
- [Improved Node Backend Development: Fastify and Docker](#improved-node-backend-development-fastify-and-docker)
- [Nx Console support for IntelliJ](#nx-console-support-for-intellij)
- [Playwright for e2e testing](#playwright-for-e2e-testing)
- [TypeScript Packaging and Batch Mode](#typescript-packaging-and-batch-mode)
- [Nx team maintained Vue plugin](#nx-team-maintained-vue-plugin)
- [Extending Nx: Local Generators, Build your Own CLI, Verdaccio Support](#extending-nx-local-generators-build-your-own-cli-verdaccio-support)
- [Module Federation](#module-federation)
- [Many OSS repos adopt Nx](#many-oss-repos-adopt-nx)
- [Nx Community](#nx-community)
- [New Content & Improved Docs](#new-content-improved-docs)
- [New Tagline: Smart Monorepos — Fast CI](#new-tagline-smart-monorepos-fast-ci)
- [Nx Conf](#nx-conf)
- [Looking ahead — 2024](#looking-ahead-2024)
- [Solving CI](#solving-ci)
- [Solving the Simplicity vs Power Dilemma](#solving-the-simplicity-vs-power-dilemma)
## Top 10 Nx Highlights of 2023
@@ -74,8 +74,8 @@ James Henry gave a deep dive talk of an early version of it at this years Nx
Since its introduction, the “nx release” feature has significantly evolved, leveraging the power of the Nx project graph to effectively understand inter-package dependencies. This understanding is crucial as it allows for:
- Versioning packages offering support for both independent and “locked” versioning strategies.
- Releasing packages in the correct sequence, ensuring dependency integrity.
- Versioning packages offering support for both independent and “locked” versioning strategies.
- Releasing packages in the correct sequence, ensuring dependency integrity.
Beyond these core functionalities, the feature also includes a robust grouping mechanism, supports semantic versioning, and changelog generation. Additionally, it provides various release targets, such as GitHub and NPM. For those having special requirements, the [programmatic API](/features/manage-releases#using-the-programmatic-api-for-nx-release) offers maximum flexibility.
@@ -99,8 +99,8 @@ This year we not only added a lot of new features to Nx Console, but also rewrot
Yes, this means you can now use the latest Nx Console directly in your [Webstorm IDE](https://www.jetbrains.com/webstorm/). Read the [announcement blog post](https://blog.nrwl.io/expanding-nx-console-to-jetbrains-ides-8a5b80fff2d7) for all the details or go ahead and install Nx Console if you didnt already:
- [Nx Console for VSCode](https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console)
- [Nx Console for IntelliJ](https://plugins.jetbrains.com/plugin/21060-nx-console)
- [Nx Console for VSCode](https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console)
- [Nx Console for IntelliJ](https://plugins.jetbrains.com/plugin/21060-nx-console)
### Playwright for e2e testing
@@ -267,8 +267,8 @@ At Nx, were excited about the Module Federation support we offer for our user
By simply installing the `nx` package (or initializing with `nx init` in any project or monorepo), you already get some cool features:
- Advanced task scheduling, including task pipelines and parallel execution.
- Efficient caching mechanisms.
- Advanced task scheduling, including task pipelines and parallel execution.
- Efficient caching mechanisms.
> If you want to learn more about such setup, make sure to check out our blog post on [how to adopt Nx on a npm/yarn/pnpm workspace](https://dev.to/nx/setup-a-monorepo-with-pnpm-workspaces-and-speed-it-up-with-nx-1eem) or the corresponding [video version](https://www.youtube.com/watch?si=0XH6Sp025xM3Rru5&v=ngdoUQBvAjo&feature=youtu.be).
@@ -312,10 +312,10 @@ Our [Youtube channel](https://www.youtube.com/@nxdevtools) has grown to over 15k
We also poured a lot of [effort into the docs](/getting-started/intro). We restructured them following the [Diataxis](https://diataxis.fr/) to make pages less overwhelming and more structured based on their type of content. Youll find
- [**Concept docs**](/concepts) — which explain some of the inner workings and mental model behind certain features. Like [how caching works](/concepts/how-caching-works).
- [**Recipes**](/recipes) — which are solution oriented. You already know how to cook, we provide the exact recipe for it.
- [**Tutorials**](/getting-started/tutorials) — for when you just want to sit down and follow along, step by step to learn how to use Nx in a certain context.
- [**Reference**](/reference) and [**API docs**](/nx-api) — pure, raw and to the point.
- [**Concept docs**](/concepts) — which explain some of the inner workings and mental model behind certain features. Like [how caching works](/concepts/how-caching-works).
- [**Recipes**](/recipes) — which are solution oriented. You already know how to cook, we provide the exact recipe for it.
- [**Tutorials**](/getting-started/tutorials) — for when you just want to sit down and follow along, step by step to learn how to use Nx in a certain context.
- [**Reference**](/reference) and [**API docs**](/nx-api) — pure, raw and to the point.
We created a brand new [“Why Nx”](/getting-started/why-nx) page explaining the overall architecture of Nx including a [brand new video](https://www.youtube.com/watch?v=-_4WMl-Fn0w) giving you a holistic overview of what Nx is capable of.
@@ -361,9 +361,9 @@ Legacy CI systems are a performance and productivity bottleneck if you use a pow
It has three components:
- [**Nx Cach**](/ci/features/remote-cache): Built-in local and remote caching to speed up your tasks and save you time and money. Available now.
- [**Nx Agents**](/ci/features/distribute-task-execution): A single line to enable distributed computation, across multiple machines. Fully managed agents, dynamically allocated based on PR size. Available early Feb.
- **Nx Workflows**: Next generation, fully managed CI solution with distribution at its core, designed from the ground up for monorepos. _Available later in 2024._
- [**Nx Cach**](/ci/features/remote-cache): Built-in local and remote caching to speed up your tasks and save you time and money. Available now.
- [**Nx Agents**](/ci/features/distribute-task-execution): A single line to enable distributed computation, across multiple machines. Fully managed agents, dynamically allocated based on PR size. Available early Feb.
- **Nx Workflows**: Next generation, fully managed CI solution with distribution at its core, designed from the ground up for monorepos. _Available later in 2024._
Optimal parallelization and distribution, using the right numbers of agents for each PR, rerunning flaky tests, splitting and distributing large test suites, handling dependencies between tasks across machines — are just some of the things we can now handle automatically for you. Turn it on and enjoy the speed.
@@ -383,10 +383,10 @@ Exciting stuff! So keep an eye on our channels, and subscribe if you havent a
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools)
- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools)
- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+24 -24
View File
@@ -11,15 +11,15 @@ Enhance, but dont interfere! Thats the ideal! And this is how extensions w
Table of Contents
- [Adding Nx to an Existing Monorepo](#adding-nx-to-an-existing-monorepo)
- [Project Crystal](#project-crystal)
- [Project Crystal Plugins in an Nx Monorepo](#project-crystal-plugins-in-an-nx-monorepo)
- [Inferred Targets](#inferred-targets)
- [Visualizing Inferred Targets](#visualizing-inferred-targets)
- [More Transparency and a Single Source of Truth](#more-transparency-and-a-single-source-of-truth)
- [Enhancing existing Monorepos with Nx Plugins](#enhancing-existing-monorepos-with-nx-plugins)
- [This is just the Beginning](#this-is-just-the-beginning)
- [Learn more](#learn-more)
- [Adding Nx to an Existing Monorepo](#adding-nx-to-an-existing-monorepo)
- [Project Crystal](#project-crystal)
- [Project Crystal Plugins in an Nx Monorepo](#project-crystal-plugins-in-an-nx-monorepo)
- [Inferred Targets](#inferred-targets)
- [Visualizing Inferred Targets](#visualizing-inferred-targets)
- [More Transparency and a Single Source of Truth](#more-transparency-and-a-single-source-of-truth)
- [Enhancing existing Monorepos with Nx Plugins](#enhancing-existing-monorepos-with-nx-plugins)
- [This is just the Beginning](#this-is-just-the-beginning)
- [Learn more](#learn-more)
---
@@ -59,10 +59,10 @@ However, this is a balancing act. More abstraction and automation means more sup
Some of the main objectives of Project Crystal are to...
- make Nx plugins more transparent
- reduce the amount of configuration required
- allow Nx plugins to be drop-in enhancements in existing npm/yarn/pnpm monorepos
- allow for a migration to an Nx plugin-powered monorepo
- make Nx plugins more transparent
- reduce the amount of configuration required
- allow Nx plugins to be drop-in enhancements in existing npm/yarn/pnpm monorepos
- allow for a migration to an Nx plugin-powered monorepo
## Project Crystal Plugins in an Nx Monorepo
@@ -78,12 +78,12 @@ npx create-nx-workspace myorg
```json {% fileName="project.json" }
{
"name": "reactapp",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/reactapp/src",
"projectType": "application",
"targets": {},
"tags": []
"name": "reactapp",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/reactapp/src",
"projectType": "application",
"targets": {},
"tags": []
}
```
@@ -181,8 +181,8 @@ We just released Project Crystal, so this is just the beginning of it. While we
## Learn more
- [Nx Docs](/getting-started/intro)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Nx Docs](/getting-started/intro)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+17 -17
View File
@@ -12,11 +12,11 @@ We're excited to introduce a new way to enhance your [Nuxt](https://nuxt.com/) d
Using Nx with your Nuxt.js projects presents the following advantages:
- **Monorepo Management**: Simplify the management of multiple projects within a single repository, facilitating code sharing and reducing overhead.
- **Modular Development**: Break down your Nuxt app into manageable, independent modules that can be developed, tested, and deployed in isolation.
- **Enhanced Caching**: Accelerate your development with Nx's intelligent caching, automatically configured for your Nuxt projects.
- **Nx generators**: Nx provides generators for scaffolding new Nuxt applications, with support for Jest, Storybook, and e2e test generation with Cypress or Playwright.
- **Automated upgrades**: Nx offers a set of migrators that help you upgrade your projects.
- **Monorepo Management**: Simplify the management of multiple projects within a single repository, facilitating code sharing and reducing overhead.
- **Modular Development**: Break down your Nuxt app into manageable, independent modules that can be developed, tested, and deployed in isolation.
- **Enhanced Caching**: Accelerate your development with Nx's intelligent caching, automatically configured for your Nuxt projects.
- **Nx generators**: Nx provides generators for scaffolding new Nuxt applications, with support for Jest, Storybook, and e2e test generation with Cypress or Playwright.
- **Automated upgrades**: Nx offers a set of migrators that help you upgrade your projects.
## Getting Started with Nx and Nuxt.js
@@ -57,9 +57,9 @@ Integrating Nx into an existing Nuxt.js project has never been easier, with the
When you run `nx init` in your existing Nuxt.js project, Nx does the following:
- **Installs @nx/nuxt**: Adds the necessary Nx and @nx/nuxt dependencies to your project, enabling Nx's features while keeping your existing setup intact.
- **Understands Existing Configurations**: Nx automatically recognizes your nuxt.config.js or nuxt.config.ts file, ensuring that all your custom configurations, scripts, and commands are preserved and utilized.
- **Minimal Configuration**: Only a minimal `nx.json` file is added to your project. This file is used to configure the `@nx/nuxt` plugin if needed, but in most cases, your existing Nuxt.js configurations will suffice.
- **Installs @nx/nuxt**: Adds the necessary Nx and @nx/nuxt dependencies to your project, enabling Nx's features while keeping your existing setup intact.
- **Understands Existing Configurations**: Nx automatically recognizes your nuxt.config.js or nuxt.config.ts file, ensuring that all your custom configurations, scripts, and commands are preserved and utilized.
- **Minimal Configuration**: Only a minimal `nx.json` file is added to your project. This file is used to configure the `@nx/nuxt` plugin if needed, but in most cases, your existing Nuxt.js configurations will suffice.
To begin the integration process, simply navigate to the root of your existing Nuxt.js project and run:
@@ -69,9 +69,9 @@ npx nx init
This approach offers several key benefits for teams looking to adopt Nx:
- **Zero Disruption**: Your project will continue to use its existing configurations, and the existing configuration entrypoint files. There's no need to learn new configuration syntaxes or reconfigure your project to start using Nx.
- **Immediate Value**: Instantly gain access to Nx's powerful developer tools and build system, without significant changes to your project.
- **Future Flexibility**: As your project grows, Nx is ready to scale with you. You can gradually adopt more Nx features and plugins over time, at a pace that suits your team.
- **Zero Disruption**: Your project will continue to use its existing configurations, and the existing configuration entrypoint files. There's no need to learn new configuration syntaxes or reconfigure your project to start using Nx.
- **Immediate Value**: Instantly gain access to Nx's powerful developer tools and build system, without significant changes to your project.
- **Future Flexibility**: As your project grows, Nx is ready to scale with you. You can gradually adopt more Nx features and plugins over time, at a pace that suits your team.
## Using Nx to run your Nuxt app
@@ -182,9 +182,9 @@ Whether you're starting a new Nuxt project or looking to enhance an existing one
## Learn more
- [Nx Docs](/getting-started/intro)
- [X / Twitter](https://twitter.com/nxdevtools) - [LinkedIn](https://www.linkedin.com/company/nrwl)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Community Discord](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app)
- [Nx Docs](/getting-started/intro)
- [X / Twitter](https://twitter.com/nxdevtools) - [LinkedIn](https://www.linkedin.com/company/nrwl)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Community Discord](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app)
+38 -38
View File
@@ -27,32 +27,32 @@ The script below is a very simple example with only three tasks and one file bei
```yaml
jobs:
build_base:
steps:
- run: npm run build-base
- name: Save assets for use by other jobs
uses: actions/upload-artifact@v4
with:
name: base_output
path: base/output.ts
build_base:
steps:
- run: npm run build-base
- name: Save assets for use by other jobs
uses: actions/upload-artifact@v4
with:
name: base_output
path: base/output.ts
build_app1:
needs: build_base
steps:
- name: Download base output
uses: actions/download-artifact@v4
with:
name: base_output
- run: npm run build-app1
build_app1:
needs: build_base
steps:
- name: Download base output
uses: actions/download-artifact@v4
with:
name: base_output
- run: npm run build-app1
build_app2:
needs: build_base
steps:
- name: Download base output
uses: actions/download-artifact@v4
with:
name: base_output
- run: npm run build-app2
build_app2:
needs: build_base
steps:
- name: Download base output
uses: actions/download-artifact@v4
with:
name: base_output
- run: npm run build-app2
```
At any point in the future, if a task is added to the system or there is a change to the output files of build_base, this pipeline will need to be updated.
@@ -79,15 +79,15 @@ The pipeline configuration below will work no matter how many projects are in th
```yaml
jobs:
main:
# Tell Nx Cloud how many agents to use and the name of the last task
- run: |
nx-cloud start-ci-run \
--distribute-on="3 linux-medium-js" \
--stop-agents-after="e2e-ci"
# Run tasks the same way you would locally
- run: nx affected -t lint test build --parallel=3
- run: nx affected -t e2e-ci --parallel=1
main:
# Tell Nx Cloud how many agents to use and the name of the last task
- run: |
nx-cloud start-ci-run \
--distribute-on="3 linux-medium-js" \
--stop-agents-after="e2e-ci"
# Run tasks the same way you would locally
- run: nx affected -t lint test build --parallel=3
- run: nx affected -t e2e-ci --parallel=1
```
The only reason to modify this file is if you need to change the number of agent machines or there is another type of task that needs to run in CI.
@@ -120,8 +120,8 @@ If you have a task that cant be run on Nx Agents for some reason, you can eas
## Learn more
- [Nx Docs](/getting-started/intro)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Nx Docs](/getting-started/intro)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
@@ -28,16 +28,16 @@ As you can see `@tuskdesign/forms` relies on `@tuskdesign/buttons` and as such h
## Table Of Contents
- [Adding Nx](#adding-nx)
- [Installing the JavaScript/TypeScript versioning Package](#installing-the-javascripttypescript-versioning-package)
- [Running Nx Release](#running-nx-release)
- [Excluding Packages](#excluding-packages)
- [Running the Versioning and Changelog Generation](#running-the-versioning-and-changelog-generation)
- [Versioning using Conventional Commits](#versioning-using-conventional-commits)
- [Generating a GitHub Release](#generating-a-github-release)
- [Programmatic Mode](#programmatic-mode)
- [Wrapping Up](#wrapping-up)
- [Learn more](#learn-more)
- [Adding Nx](#adding-nx)
- [Installing the JavaScript/TypeScript versioning Package](#installing-the-javascripttypescript-versioning-package)
- [Running Nx Release](#running-nx-release)
- [Excluding Packages](#excluding-packages)
- [Running the Versioning and Changelog Generation](#running-the-versioning-and-changelog-generation)
- [Versioning using Conventional Commits](#versioning-using-conventional-commits)
- [Generating a GitHub Release](#generating-a-github-release)
- [Programmatic Mode](#programmatic-mode)
- [Wrapping Up](#wrapping-up)
- [Learn more](#learn-more)
## Adding Nx
@@ -91,12 +91,12 @@ pnpm nx release --dry-run --first-release
If you inspect the console output, you can see that:
- it would increment the version in the package.json
- update the pnpm (or npm) lockfile
- stage the changes with git
- creates a `CHANGELOG.md` file
- git commits everything
- git tags the commit using the version
- it would increment the version in the package.json
- update the pnpm (or npm) lockfile
- stage the changes with git
- creates a `CHANGELOG.md` file
- git commits everything
- git tags the commit using the version
The dry-run mode also nicely previews all `package.json` changes in a git diff style:
@@ -108,9 +108,9 @@ Note, if you want to get even more insights into what is happening when running
If you look closely at the dry-run logs, you may notice that Nx Release bumped the version on all of our packages:
- `@tuskdesign/forms`
- `@tuskdesign/buttons`
- `@tuskdesign/demo`
- `@tuskdesign/forms`
- `@tuskdesign/buttons`
- `@tuskdesign/demo`
![](/blog/images/2024-02-09/bodyimg6.png)
@@ -221,9 +221,9 @@ Use the `createRelease` property and set it to `github`.
To see the working, you need to make sure to:
- push the repo to GitHub
- make some change so you can run the `nx release` command again and get a changelog generated
- now also get a GH release created
- push the repo to GitHub
- make some change so you can run the `nx release` command again and get a changelog generated
- now also get a GH release created
Note, you can still use `--dry-run` and it'd show you the URL where the GitHub release would be created. You can also use the `--skip-publish` to skip the NPM publishing.
@@ -242,47 +242,47 @@ import { releaseChangelog, releasePublish, releaseVersion } from 'nx/release';
import * as yargs from 'yargs';
(async () => {
const options = await yargs
.version(false) // don't use the default meaning of version in yargs
.option('version', {
description:
'Explicit version specifier to use, if overriding conventional commits',
type: 'string',
})
.option('dryRun', {
alias: 'd',
description:
'Whether or not to perform a dry-run of the release process, defaults to true',
type: 'boolean',
default: true,
})
.option('verbose', {
description:
'Whether or not to enable verbose logging, defaults to false',
type: 'boolean',
default: false,
})
.parseAsync();
const options = await yargs
.version(false) // don't use the default meaning of version in yargs
.option('version', {
description:
'Explicit version specifier to use, if overriding conventional commits',
type: 'string',
})
.option('dryRun', {
alias: 'd',
description:
'Whether or not to perform a dry-run of the release process, defaults to true',
type: 'boolean',
default: true,
})
.option('verbose', {
description:
'Whether or not to enable verbose logging, defaults to false',
type: 'boolean',
default: false,
})
.parseAsync();
const { workspaceVersion, projectsVersionData } = await releaseVersion({
specifier: options.version,
dryRun: options.dryRun,
verbose: options.verbose,
});
const { workspaceVersion, projectsVersionData } = await releaseVersion({
specifier: options.version,
dryRun: options.dryRun,
verbose: options.verbose,
});
await releaseChangelog({
versionData: projectsVersionData,
version: workspaceVersion,
dryRun: options.dryRun,
verbose: options.verbose,
});
await releaseChangelog({
versionData: projectsVersionData,
version: workspaceVersion,
dryRun: options.dryRun,
verbose: options.verbose,
});
// The returned number value from releasePublish will be zero if all projects are published successfully, non-zero if not
const publishStatus = await releasePublish({
dryRun: options.dryRun,
verbose: options.verbose,
});
process.exit(publishStatus);
// The returned number value from releasePublish will be zero if all projects are published successfully, non-zero if not
const publishStatus = await releasePublish({
dryRun: options.dryRun,
verbose: options.verbose,
});
process.exit(publishStatus);
})();
```
@@ -296,8 +296,8 @@ Notice by default in the script we have `dry-run` enabled as a more cautious app
From here on you have full control and can pretty much do whatever works best for your workspace setup. Common examples include:
- moving files to a common root-level `dist/` folder and version and release them from there. This is pretty common to avoid messing with your src files and swapping versions there, allowing you to always depend on the latest local packages for instance.
- setting up fully automated releases on CI, including enabling provenance support. Our docs have [more details on how to set that up](/recipes/nx-release/publish-in-ci-cd) or check out the linked talk above which goes through those steps.
- moving files to a common root-level `dist/` folder and version and release them from there. This is pretty common to avoid messing with your src files and swapping versions there, allowing you to always depend on the latest local packages for instance.
- setting up fully automated releases on CI, including enabling provenance support. Our docs have [more details on how to set that up](/recipes/nx-release/publish-in-ci-cd) or check out the linked talk above which goes through those steps.
## Wrapping Up
@@ -305,18 +305,18 @@ With this release of Nx Release it is fully ready to be used. Make sure to check
Here are some example repositories already leveraging Nx release:
- [Our own Nx Repo](https://github.com/nrwl/nx/blob/master/scripts/nx-release.ts)
- [RxJS repo](https://github.com/ReactiveX/rxjs/tree/master/scripts)
- [Typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/blob/main/tools/release/release.mts)
- [Watch the live stream](https://www.youtube.com/watch?v=lYNa6Ct4RkY) with [Kent](https://twitter.com/kentcdodds) and [James](https://twitter.com/MrJamesHenry) as they enable Nx Release on the [EpicWeb workshop app repository](https://github.com/epicweb-dev/kcdshop)
- [Our own Nx Repo](https://github.com/nrwl/nx/blob/master/scripts/nx-release.ts)
- [RxJS repo](https://github.com/ReactiveX/rxjs/tree/master/scripts)
- [Typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/blob/main/tools/release/release.mts)
- [Watch the live stream](https://www.youtube.com/watch?v=lYNa6Ct4RkY) with [Kent](https://twitter.com/kentcdodds) and [James](https://twitter.com/MrJamesHenry) as they enable Nx Release on the [EpicWeb workshop app repository](https://github.com/epicweb-dev/kcdshop)
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X / Twitter](https://twitter.com/nxdevtools) — [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Nx Docs](/getting-started/intro)
- [X / Twitter](https://twitter.com/nxdevtools) — [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+15 -15
View File
@@ -16,16 +16,16 @@ In this article, were going to recap all the things launched during Launch Nx
---
- [Nx 18.0 && Project Crystal](#nx-180-project-crystal)
- [Project Crystal — By Juri Strumpflohner](#conference-talk-project-crystal)
- [Project Crystal + .NET in Action — By Craigory Coppola](#conference-talk-project-crystal-net-in-action)
- [New Plugin: @nx/nuxt](#new-plugin-nxnuxt)
- [Nx Agents](#nx-agents-launched)
- [Nx Agents Walkthrough: Effortlessly Fast CI Built for Monorepos — By Rares Matei](#conference-talk-nx-agents-walkthrough-effortlessly-fast-ci-built-for-monorepos)
- [Solving E2E Tests — By Altan Stalker](#conference-talk-solving-e2e-tests)
- [Tusky](#tusky)
- [Nx Release](#nx-release-is-stable)
- [Releasing Nx Release — By James Henry](#conference-talk-releasing-nx-release)
- [Nx 18.0 && Project Crystal](#nx-180-project-crystal)
- [Project Crystal — By Juri Strumpflohner](#conference-talk-project-crystal)
- [Project Crystal + .NET in Action — By Craigory Coppola](#conference-talk-project-crystal-net-in-action)
- [New Plugin: @nx/nuxt](#new-plugin-nxnuxt)
- [Nx Agents](#nx-agents-launched)
- [Nx Agents Walkthrough: Effortlessly Fast CI Built for Monorepos — By Rares Matei](#conference-talk-nx-agents-walkthrough-effortlessly-fast-ci-built-for-monorepos)
- [Solving E2E Tests — By Altan Stalker](#conference-talk-solving-e2e-tests)
- [Tusky](#tusky)
- [Nx Release](#nx-release-is-stable)
- [Releasing Nx Release — By James Henry](#conference-talk-releasing-nx-release)
## Nx 18.0 && Project Crystal
@@ -141,8 +141,8 @@ Thats all for now folks! Were just starting up a new iteration of developm
## Learn more
- [Nx Docs](/getting-started/intro)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Nx Docs](/getting-started/intro)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+20 -20
View File
@@ -14,15 +14,15 @@ Nx is a suite of powerful tools designed to optimize your development workflow,
The ability to iterate quickly and efficiently is vital for any software project. Speed in the development process offers several critical advantages:
- **Faster feedback loops:** Quick iterations mean immediate feedback, allowing teams to adapt, learn, and improve their work on the fly.
- **Reduced time to market:** Accelerating the development process can significantly cut down the overall time to market, providing a competitive edge which reclaims revenue that would have otherwise been lost.
- **Decreased developer frustration:** [No more waiting for builds and tests to complete](/ci/concepts/reduce-waste). A streamlined workflow keeps morale high and productivity higher.
- **Faster feedback loops:** Quick iterations mean immediate feedback, allowing teams to adapt, learn, and improve their work on the fly.
- **Reduced time to market:** Accelerating the development process can significantly cut down the overall time to market, providing a competitive edge which reclaims revenue that would have otherwise been lost.
- **Decreased developer frustration:** [No more waiting for builds and tests to complete](/ci/concepts/reduce-waste). A streamlined workflow keeps morale high and productivity higher.
If youre using Nx already, youre already familiar with
- [**Affected**](/ci/features/affected) - identifying and running tasks only on projects impacted by code changes,
- [**Nx Replay**](/ci/features/remote-cache) - our powerful cache and
- [**Nx Agents**](/ci/features/distribute-task-execution) - the concept of [Parallelization and Distribution](/ci/concepts/parallelization-distribution).
- [**Affected**](/ci/features/affected) - identifying and running tasks only on projects impacted by code changes,
- [**Nx Replay**](/ci/features/remote-cache) - our powerful cache and
- [**Nx Agents**](/ci/features/distribute-task-execution) - the concept of [Parallelization and Distribution](/ci/concepts/parallelization-distribution).
But lets see all the extra things we did this past year to make everything faster.
@@ -54,13 +54,13 @@ With Nx Replay, you can see significant speed improvements in your CI pipelines
[Nx Agents](/ci/features/distribute-task-execution) represent the pinnacle of task distribution optimization, ensuring that tasks are executed as efficiently as possible based on the specific requirements of each change. Some features that make up this effort are:
- [Easy integration with existing providers](/ci/features/distribute-task-execution#cicd-guides)
- Distribution is handled on the Nx Cloud infrastructure and all you need is a single line. Whats more, all results are played back to your original CI provider script which triggers the Nx Cloud distribution, so that you can make use of the resulting artifacts
- [Efficient task distribution](/ci/features/dynamic-agents)
- Save compute resources and reduce costs, minimizing idle time and compute waste
- Dynamic sizing based on PR size
- [Tusky](https://nx.app/products/tusky) - our AI solution - coming soon
- You set your desired cost/speed ratio, and you forget about any more configuration. We ensure maximum speed up to limits you set yourself.
- [Easy integration with existing providers](/ci/features/distribute-task-execution#cicd-guides)
- Distribution is handled on the Nx Cloud infrastructure and all you need is a single line. Whats more, all results are played back to your original CI provider script which triggers the Nx Cloud distribution, so that you can make use of the resulting artifacts
- [Efficient task distribution](/ci/features/dynamic-agents)
- Save compute resources and reduce costs, minimizing idle time and compute waste
- Dynamic sizing based on PR size
- [Tusky](https://nx.app/products/tusky) - our AI solution - coming soon
- You set your desired cost/speed ratio, and you forget about any more configuration. We ensure maximum speed up to limits you set yourself.
You can read more about Nx Agents [here](https://nx.app/products/agents#content).
@@ -96,10 +96,10 @@ Nx provides an unparalleled toolkit for developers and teams looking to optimize
## Learn more
- [Nx Docs](/getting-started/intro)
- [X / Twitter](https://twitter.com/nxdevtools)
- [LinkedIn](https://www.linkedin.com/company/nrwl)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Community Discord](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app)
- [Nx Docs](/getting-started/intro)
- [X / Twitter](https://twitter.com/nxdevtools)
- [LinkedIn](https://www.linkedin.com/company/nrwl)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Community Discord](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app)
+12 -12
View File
@@ -42,16 +42,16 @@ To understand why the traditional CI execution model fails to handle failures, l
Failures can be:
- hard _(npm fails to install, nothing can run)_
- soft _(a test takes a lot longer than it should because, perhaps, due to an out-of-memory issue)_
- hard _(npm fails to install, nothing can run)_
- soft _(a test takes a lot longer than it should because, perhaps, due to an out-of-memory issue)_
Focusing on the latter is just as important as focusing on the former. **Slow CI is broken CI.**
Tasks can fail:
- legitimately _(a broken build)_
- for external reasons _(npm install fails cause npm is down)_
- for unknown reasons _(a flaky test)_
- legitimately _(a broken build)_
- for external reasons _(npm install fails cause npm is down)_
- for unknown reasons _(a flaky test)_
**The traditional CI execution model doesnt tolerate any of these failures.**
@@ -180,10 +180,10 @@ We also have a **Pro for Startups** plan which offers agents that are 3.5x cheap
## Learn more
- [Nx Docs](/getting-started/intro)
- [X / Twitter](https://twitter.com/nxdevtools)
- [LinkedIn](https://www.linkedin.com/company/nrwl)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Community Discord](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app)
- [Nx Docs](/getting-started/intro)
- [X / Twitter](https://twitter.com/nxdevtools)
- [LinkedIn](https://www.linkedin.com/company/nrwl)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Community Discord](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app)
+26 -26
View File
@@ -16,9 +16,9 @@ The Nx Gradle plugin registers Gradle projects in your Nx workspace. It allows G
This blog will show you:
- [What is Nx?](#what-is-nx)
- [How to add Nx to a Gradle workspace](#how-to-add-nx-to-a-gradle-workspace)
- [How to add @nx/gradle to an existing Nx workspace](#how-to-add-nxgradle-to-an-existing-nx-workspace)
- [What is Nx?](#what-is-nx)
- [How to add Nx to a Gradle workspace](#how-to-add-nx-to-a-gradle-workspace)
- [How to add @nx/gradle to an existing Nx workspace](#how-to-add-nxgradle-to-an-existing-nx-workspace)
---
@@ -30,10 +30,10 @@ From [nx.dev](): “Nx is a build system with built-in tooling and advanced CI c
Nx adds the following features to your workspace:
- [Cache task results](/features/cache-task-results): By storing task outputs in a cache, subsequent runs can skip redundant computations and reuse previously calculated results, significantly speeding up build processes. Nx intelligently manages this caching mechanism, invalidating the cache automatically when relevant inputs change.
- [Distribute task execution](/ci/features/distribute-task-execution): Nx CI efficiently distributes tasks across multiple machines for faster build times. It uses a distributed task execution algorithm to intelligently divide and assign tasks to available resources, minimizing redundant work and maximizing parallelism.
- [Run only tasks affected by a PR](/ci/features/affected): Nx identifies changes made since a specified base commit or branch, and then selectively runs tasks (like tests, linting, or builds) related to those changes.
- [Interactively explore your workspace](/features/explore-graph): Nx allows developers to visualize and understand the dependencies and relationships within their projects.
- [Cache task results](/features/cache-task-results): By storing task outputs in a cache, subsequent runs can skip redundant computations and reuse previously calculated results, significantly speeding up build processes. Nx intelligently manages this caching mechanism, invalidating the cache automatically when relevant inputs change.
- [Distribute task execution](/ci/features/distribute-task-execution): Nx CI efficiently distributes tasks across multiple machines for faster build times. It uses a distributed task execution algorithm to intelligently divide and assign tasks to available resources, minimizing redundant work and maximizing parallelism.
- [Run only tasks affected by a PR](/ci/features/affected): Nx identifies changes made since a specified base commit or branch, and then selectively runs tasks (like tests, linting, or builds) related to those changes.
- [Interactively explore your workspace](/features/explore-graph): Nx allows developers to visualize and understand the dependencies and relationships within their projects.
![Example Nx Graph](/blog/images/2024-04-19/bodyimg1.webp)
@@ -147,8 +147,8 @@ Furthermore, instead of running the command in terminal, you can use the editor
To download:
- [**Nx Console - Visual Studio Marketplace**](https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console)
- [**Nx Console - IntelliJ IDEs Plugin | Marketplace**](https://plugins.jetbrains.com/plugin/21060-nx-console)
- [**Nx Console - Visual Studio Marketplace**](https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console)
- [**Nx Console - IntelliJ IDEs Plugin | Marketplace**](https://plugins.jetbrains.com/plugin/21060-nx-console)
---
@@ -176,8 +176,8 @@ For example, if you run `./gradlew :app:build` or `gradlew.bat :app:build` using
The `@nx/gradle` plugin will create an Nx project for each Gradle configuration file present. Any of the following files will be recognized as a Gradle configuration file:
- `gradle.build`
- `gradle.build.kts`
- `gradle.build`
- `gradle.build.kts`
### @nx/gradle Configuration
@@ -185,16 +185,16 @@ The `@nx/gradle` is configured in the plugins array in `nx.json`:
```json {% fileName="nx.json" %}
{
"plugins": [
{
"plugin": "@nx/gradle",
"options": {
"testTargetName": "test",
"classesTargetName": "classes",
"buildTargetName": "build"
"plugins": [
{
"plugin": "@nx/gradle",
"options": {
"testTargetName": "test",
"classesTargetName": "classes",
"buildTargetName": "build"
}
}
}
]
]
}
```
@@ -210,9 +210,9 @@ Here is how to set up Nx with the Gradle workspace. Hopefully, this gives you a
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+20 -20
View File
@@ -20,17 +20,17 @@ Nx 19 represents a return to form, matching the reliable 6-month schedule. Nx 19
Here's the rundown of the major things we'll cover in this update:
- [NEW PLUGIN: @nx/gradle](#new-plugin-nxgradle)
- [Nx Atomizer Enhancements](#nx-atomizer-enhancements)
- [Associated Technologies Added To Tasks](#associated-technologies-added-to-tasks)
- [Generators to Convert to Project Crystal](#generators-to-convert-to-project-crystal)
- [BREAKING CHANGE: Updating Bundled Environment Variables: `NX_` to `NX_PUBLIC_`](#breaking-change-updating-bundled-environment-variables-to)
- [General Crystal Polishing](#general-crystal-polishing)
- [Nx Cloud Updates!](#nx-cloud-updates)
- [More Miscellaneous Updates!](#more-miscellaneous-updates)
- [New Conference: Monorepo World 2024](#new-conference-monorepo-world-2024)
- [Wrapping Up, And A Heartfelt Thank You](#wrapping-up-and-a-heartfelt-thank-you)
- [Learn More](#learn-more)
- [NEW PLUGIN: @nx/gradle](#new-plugin-nxgradle)
- [Nx Atomizer Enhancements](#nx-atomizer-enhancements)
- [Associated Technologies Added To Tasks](#associated-technologies-added-to-tasks)
- [Generators to Convert to Project Crystal](#generators-to-convert-to-project-crystal)
- [BREAKING CHANGE: Updating Bundled Environment Variables: `NX_` to `NX_PUBLIC_`](#breaking-change-updating-bundled-environment-variables-to)
- [General Crystal Polishing](#general-crystal-polishing)
- [Nx Cloud Updates!](#nx-cloud-updates)
- [More Miscellaneous Updates!](#more-miscellaneous-updates)
- [New Conference: Monorepo World 2024](#new-conference-monorepo-world-2024)
- [Wrapping Up, And A Heartfelt Thank You](#wrapping-up-and-a-heartfelt-thank-you)
- [Learn More](#learn-more)
**Prefer a video?**
@@ -174,9 +174,9 @@ In addition - we are adding more process to make the triage of these issues more
We've got some cool stats to share from our users regarding the benefits of [Nx Cloud](https://nx.app), our premium CI service. The three areas we've identified as the critical aspects of a CI provider are: speed, cost, and reliablity. In these areas we've seen:
- **speed**: Reported 30% - 70% faster CI
- **cost**: Reported 40% - 75% reduction in CI costs
- **reliability**: Nx Cloud's automatic detection and retrying of flaky tests makes the issue of flaky tests largely go away entirely. You can read more on [our thoughts on reliability here](/blog/reliable-ci-a-new-execution-model-fixing-both-flakiness-and-slowness).
- **speed**: Reported 30% - 70% faster CI
- **cost**: Reported 40% - 75% reduction in CI costs
- **reliability**: Nx Cloud's automatic detection and retrying of flaky tests makes the issue of flaky tests largely go away entirely. You can read more on [our thoughts on reliability here](/blog/reliable-ci-a-new-execution-model-fixing-both-flakiness-and-slowness).
In February, we launched two big enhancements to Nx Cloud: the [Atomizer](/ci/features/split-e2e-tasks) and [Nx Agents](https://nx.app/products/agents#content).
@@ -230,9 +230,9 @@ Zack
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+54 -54
View File
@@ -1,56 +1,56 @@
[
{
"name": "Juri Strumpflohner",
"image": "/blog/images/Juri Strumpfloner.jpeg",
"twitter": "juristr",
"github": "juristr"
},
{
"name": "Colum Ferry",
"image": "/blog/images/Colum Ferry.jpeg",
"twitter": "FerryColum",
"github": "Coly010"
},
{
"name": "Emily Xiong",
"image": "/blog/images/Emily Xiong.jpeg",
"twitter": "xiongemily",
"github": "xiongemi"
},
{
"name": "Isaac Mann",
"image": "/blog/images/Isaac Mann.jpeg",
"twitter": "mannisaac",
"github": "isaacplmann"
},
{
"name": "Katerina Skroumpelou",
"image": "/blog/images/Katerina Skroumpelou.jpeg",
"twitter": "psybercity",
"github": "mandarini"
},
{
"name": "Max Kless",
"image": "/blog/images/Max Kless.jpeg",
"twitter": "MaxKless",
"github": "MaxKless"
},
{
"name": "Victor Savkin",
"image": "/blog/images/Victor Savkin.jpeg",
"twitter": "victorsavkin",
"github": "vsavkin"
},
{
"name": "Zack DeRose",
"image": "/blog/images/Zack DeRose.jpeg",
"twitter": "zackderose",
"github": "ZackDeRose"
},
{
"name": "Jeff Cross",
"image": "/blog/images/Jeff Cross.jpeg",
"twitter": "jeffbcross",
"github": "jeffbcross"
}
{
"name": "Juri Strumpflohner",
"image": "/blog/images/Juri Strumpfloner.jpeg",
"twitter": "juristr",
"github": "juristr"
},
{
"name": "Colum Ferry",
"image": "/blog/images/Colum Ferry.jpeg",
"twitter": "FerryColum",
"github": "Coly010"
},
{
"name": "Emily Xiong",
"image": "/blog/images/Emily Xiong.jpeg",
"twitter": "xiongemily",
"github": "xiongemi"
},
{
"name": "Isaac Mann",
"image": "/blog/images/Isaac Mann.jpeg",
"twitter": "mannisaac",
"github": "isaacplmann"
},
{
"name": "Katerina Skroumpelou",
"image": "/blog/images/Katerina Skroumpelou.jpeg",
"twitter": "psybercity",
"github": "mandarini"
},
{
"name": "Max Kless",
"image": "/blog/images/Max Kless.jpeg",
"twitter": "MaxKless",
"github": "MaxKless"
},
{
"name": "Victor Savkin",
"image": "/blog/images/Victor Savkin.jpeg",
"twitter": "victorsavkin",
"github": "vsavkin"
},
{
"name": "Zack DeRose",
"image": "/blog/images/Zack DeRose.jpeg",
"twitter": "zackderose",
"github": "ZackDeRose"
},
{
"name": "Jeff Cross",
"image": "/blog/images/Jeff Cross.jpeg",
"twitter": "jeffbcross",
"github": "jeffbcross"
}
]
+10 -10
View File
@@ -1,12 +1,12 @@
[
"cypress",
"express",
"jest",
"linter",
"nest",
"node",
"storybook",
"web",
"workspace",
"js"
"cypress",
"express",
"jest",
"linter",
"nest",
"node",
"storybook",
"web",
"workspace",
"js"
]
+4 -4
View File
@@ -2,10 +2,10 @@
We were so excited about the features in Nx 18 that we created a whole [Launch Nx Week](/launch-nx) to share our excitement with you. During the launch week, we made the following announcements:
- [Project Crystal](/blog/what-if-nx-plugins-were-more-like-vscode-extensions) allows you to use inferred tasks
- A new [`@nx/nuxt`](/blog/introducing-nx-nuxt-enhanced-nuxt-js-support-in-nx) plugin is available
- [Nx Agents](/blog/fast-effortless-ci) are publicly available
- [`nx release`](/blog/versioning-and-releasing-packages-in-a-monorepo) is out of beta
- [Project Crystal](/blog/what-if-nx-plugins-were-more-like-vscode-extensions) allows you to use inferred tasks
- A new [`@nx/nuxt`](/blog/introducing-nx-nuxt-enhanced-nuxt-js-support-in-nx) plugin is available
- [Nx Agents](/blog/fast-effortless-ci) are publicly available
- [`nx release`](/blog/versioning-and-releasing-packages-in-a-monorepo) is out of beta
{% youtube
src="https://youtu.be/Ed1ZCNqWF1Q"
+7 -7
View File
@@ -5,8 +5,8 @@ description: 'Executes any command as if it was a target on the project'
# exec
- Executes any command as if it was a target on the project
- Executes an arbitrary command in each package
- Executes any command as if it was a target on the project
- Executes an arbitrary command in each package
## Usage
@@ -14,11 +14,11 @@ In package.json, adding a script with `nx exec` will run the command as if it is
```json
{
"name": "myorg",
"version": "0.0.1",
"scripts": {
"build": "nx exec -- <command> [..args]"
}
"name": "myorg",
"version": "0.0.1",
"scripts": {
"build": "nx exec -- <command> [..args]"
}
}
```
+5 -5
View File
@@ -1,17 +1,17 @@
---
title: 'migrate - CLI command'
description:
'Creates a migrations file or runs migrations from the migrations file.
- Migrate packages and create migrations.json (e.g., nx migrate @nx/workspace@latest)
- Run migrations (e.g., nx migrate --run-migrations=migrations.json). Use flag --if-exists to run migrations only if the migrations file exists.'
'Creates a migrations file or runs migrations from the migrations file.
- Migrate packages and create migrations.json (e.g., nx migrate @nx/workspace@latest)
- Run migrations (e.g., nx migrate --run-migrations=migrations.json). Use flag --if-exists to run migrations only if the migrations file exists.'
---
# migrate
Creates a migrations file or runs migrations from the migrations file.
- Migrate packages and create migrations.json (e.g., nx migrate @nx/workspace@latest)
- Run migrations (e.g., nx migrate --run-migrations=migrations.json). Use flag --if-exists to run migrations only if the migrations file exists.
- Migrate packages and create migrations.json (e.g., nx migrate @nx/workspace@latest)
- Run migrations (e.g., nx migrate --run-migrations=migrations.json). Use flag --if-exists to run migrations only if the migrations file exists.
## Usage
+7 -7
View File
@@ -2,14 +2,14 @@
title: 'repair - CLI command'
description: 'Repair any configuration that is no longer supported by Nx.
Specifically, this will run every migration within the `nx` package
against the current repository. Doing so should fix any configuration
details left behind if the repository was previously updated to a new
Nx version without using `nx migrate`.
Specifically, this will run every migration within the `nx` package
against the current repository. Doing so should fix any configuration
details left behind if the repository was previously updated to a new
Nx version without using `nx migrate`.
If your repository has only ever updated to newer versions of Nx with
`nx migrate`, running `nx repair` should do nothing.
'
If your repository has only ever updated to newer versions of Nx with
`nx migrate`, running `nx repair` should do nothing.
'
---
# repair
+4 -4
View File
@@ -1,12 +1,12 @@
---
title: 'run - CLI command'
description: 'Run a target for a project
(e.g., nx run myapp:serve:production).
(e.g., nx run myapp:serve:production).
You can also use the infix notation to run a target:
(e.g., nx serve myapp --configuration=production)
You can also use the infix notation to run a target:
(e.g., nx serve myapp --configuration=production)
You can skip the use of Nx cache by using the --skip-nx-cache option.'
You can skip the use of Nx cache by using the --skip-nx-cache option.'
---
# run
@@ -5,30 +5,30 @@ It allows Nx to recieve partial results and continue processing for better UX.
## Hierarchy
- `Error`
- `Error`
**`AggregateCreateNodesError`**
**`AggregateCreateNodesError`**
## Table of contents
### Constructors
- [constructor](../../devkit/documents/AggregateCreateNodesError#constructor)
- [constructor](../../devkit/documents/AggregateCreateNodesError#constructor)
### Properties
- [cause](../../devkit/documents/AggregateCreateNodesError#cause): unknown
- [errors](../../devkit/documents/AggregateCreateNodesError#errors): [file: string, error: Error][]
- [message](../../devkit/documents/AggregateCreateNodesError#message): string
- [name](../../devkit/documents/AggregateCreateNodesError#name): string
- [partialResults](../../devkit/documents/AggregateCreateNodesError#partialresults): CreateNodesResultV2
- [stack](../../devkit/documents/AggregateCreateNodesError#stack): string
- [prepareStackTrace](../../devkit/documents/AggregateCreateNodesError#preparestacktrace): Function
- [stackTraceLimit](../../devkit/documents/AggregateCreateNodesError#stacktracelimit): number
- [cause](../../devkit/documents/AggregateCreateNodesError#cause): unknown
- [errors](../../devkit/documents/AggregateCreateNodesError#errors): [file: string, error: Error][]
- [message](../../devkit/documents/AggregateCreateNodesError#message): string
- [name](../../devkit/documents/AggregateCreateNodesError#name): string
- [partialResults](../../devkit/documents/AggregateCreateNodesError#partialresults): CreateNodesResultV2
- [stack](../../devkit/documents/AggregateCreateNodesError#stack): string
- [prepareStackTrace](../../devkit/documents/AggregateCreateNodesError#preparestacktrace): Function
- [stackTraceLimit](../../devkit/documents/AggregateCreateNodesError#stacktracelimit): number
### Methods
- [captureStackTrace](../../devkit/documents/AggregateCreateNodesError#capturestacktrace)
- [captureStackTrace](../../devkit/documents/AggregateCreateNodesError#capturestacktrace)
## Constructors
@@ -53,22 +53,22 @@ Throwing this error from a `createNodesV2` function will allow Nx to continue pr
```ts
export async function createNodesV2(files: string[]) {
const partialResults = [];
const errors = [];
await Promise.all(
files.map(async (file) => {
try {
const result = await createNodes(file);
partialResults.push(result);
} catch (e) {
errors.push([file, e]);
}
})
);
if (errors.length > 0) {
throw new AggregateCreateNodesError(errors, partialResults);
}
return partialResults;
const partialResults = [];
const errors = [];
await Promise.all(
files.map(async (file) => {
try {
const result = await createNodes(file);
partialResults.push(result);
} catch (e) {
errors.push([file, e]);
}
})
);
if (errors.length > 0) {
throw new AggregateCreateNodesError(errors, partialResults);
}
return partialResults;
}
```
+2 -2
View File
@@ -4,8 +4,8 @@
### Enumeration Members
- [Delete](../../devkit/documents/ChangeType#delete)
- [Insert](../../devkit/documents/ChangeType#insert)
- [Delete](../../devkit/documents/ChangeType#delete)
- [Insert](../../devkit/documents/ChangeType#insert)
## Enumeration Members
@@ -6,12 +6,12 @@ Context for [CreateDependencies](../../devkit/documents/CreateDependencies)
### Properties
- [externalNodes](../../devkit/documents/CreateDependenciesContext#externalnodes): Record<string, ProjectGraphExternalNode>
- [fileMap](../../devkit/documents/CreateDependenciesContext#filemap): FileMap
- [filesToProcess](../../devkit/documents/CreateDependenciesContext#filestoprocess): FileMap
- [nxJsonConfiguration](../../devkit/documents/CreateDependenciesContext#nxjsonconfiguration): NxJsonConfiguration<string[] | "\*">
- [projects](../../devkit/documents/CreateDependenciesContext#projects): Record<string, ProjectConfiguration>
- [workspaceRoot](../../devkit/documents/CreateDependenciesContext#workspaceroot): string
- [externalNodes](../../devkit/documents/CreateDependenciesContext#externalnodes): Record<string, ProjectGraphExternalNode>
- [fileMap](../../devkit/documents/CreateDependenciesContext#filemap): FileMap
- [filesToProcess](../../devkit/documents/CreateDependenciesContext#filestoprocess): FileMap
- [nxJsonConfiguration](../../devkit/documents/CreateDependenciesContext#nxjsonconfiguration): NxJsonConfiguration<string[] | "\*">
- [projects](../../devkit/documents/CreateDependenciesContext#projects): Record<string, ProjectConfiguration>
- [workspaceRoot](../../devkit/documents/CreateDependenciesContext#workspaceroot): string
## Properties
+5 -5
View File
@@ -4,17 +4,17 @@ Context for [CreateNodesFunction](../../devkit/documents/CreateNodesFunction)
## Hierarchy
- [`CreateNodesContextV2`](../../devkit/documents/CreateNodesContextV2)
- [`CreateNodesContextV2`](../../devkit/documents/CreateNodesContextV2)
**`CreateNodesContext`**
**`CreateNodesContext`**
## Table of contents
### Properties
- [configFiles](../../devkit/documents/CreateNodesContext#configfiles): readonly string[]
- [nxJsonConfiguration](../../devkit/documents/CreateNodesContext#nxjsonconfiguration): NxJsonConfiguration<string[] | "\*">
- [workspaceRoot](../../devkit/documents/CreateNodesContext#workspaceroot): string
- [configFiles](../../devkit/documents/CreateNodesContext#configfiles): readonly string[]
- [nxJsonConfiguration](../../devkit/documents/CreateNodesContext#nxjsonconfiguration): NxJsonConfiguration<string[] | "\*">
- [workspaceRoot](../../devkit/documents/CreateNodesContext#workspaceroot): string
## Properties
@@ -2,16 +2,16 @@
## Hierarchy
- **`CreateNodesContextV2`**
- **`CreateNodesContextV2`**
↳ [`CreateNodesContext`](../../devkit/documents/CreateNodesContext)
↳ [`CreateNodesContext`](../../devkit/documents/CreateNodesContext)
## Table of contents
### Properties
- [nxJsonConfiguration](../../devkit/documents/CreateNodesContextV2#nxjsonconfiguration): NxJsonConfiguration<string[] | "\*">
- [workspaceRoot](../../devkit/documents/CreateNodesContextV2#workspaceroot): string
- [nxJsonConfiguration](../../devkit/documents/CreateNodesContextV2#nxjsonconfiguration): NxJsonConfiguration<string[] | "\*">
- [workspaceRoot](../../devkit/documents/CreateNodesContextV2#workspaceroot): string
## Properties
+2 -2
View File
@@ -4,8 +4,8 @@
### Properties
- [externalNodes](../../devkit/documents/CreateNodesResult#externalnodes): Record<string, ProjectGraphExternalNode>
- [projects](../../devkit/documents/CreateNodesResult#projects): Record<string, Optional<ProjectConfiguration, "root">>
- [externalNodes](../../devkit/documents/CreateNodesResult#externalnodes): Record<string, ProjectGraphExternalNode>
- [projects](../../devkit/documents/CreateNodesResult#projects): Record<string, Optional<ProjectConfiguration, "root">>
## Properties
@@ -4,16 +4,16 @@
### Properties
- [batch](../../devkit/documents/DefaultTasksRunnerOptions#batch): boolean
- [cacheDirectory](../../devkit/documents/DefaultTasksRunnerOptions#cachedirectory): string
- [cacheableOperations](../../devkit/documents/DefaultTasksRunnerOptions#cacheableoperations): string[]
- [cacheableTargets](../../devkit/documents/DefaultTasksRunnerOptions#cacheabletargets): string[]
- [captureStderr](../../devkit/documents/DefaultTasksRunnerOptions#capturestderr): boolean
- [lifeCycle](../../devkit/documents/DefaultTasksRunnerOptions#lifecycle): LifeCycle
- [parallel](../../devkit/documents/DefaultTasksRunnerOptions#parallel): number
- [remoteCache](../../devkit/documents/DefaultTasksRunnerOptions#remotecache): RemoteCache
- [runtimeCacheInputs](../../devkit/documents/DefaultTasksRunnerOptions#runtimecacheinputs): string[]
- [skipNxCache](../../devkit/documents/DefaultTasksRunnerOptions#skipnxcache): boolean
- [batch](../../devkit/documents/DefaultTasksRunnerOptions#batch): boolean
- [cacheDirectory](../../devkit/documents/DefaultTasksRunnerOptions#cachedirectory): string
- [cacheableOperations](../../devkit/documents/DefaultTasksRunnerOptions#cacheableoperations): string[]
- [cacheableTargets](../../devkit/documents/DefaultTasksRunnerOptions#cacheabletargets): string[]
- [captureStderr](../../devkit/documents/DefaultTasksRunnerOptions#capturestderr): boolean
- [lifeCycle](../../devkit/documents/DefaultTasksRunnerOptions#lifecycle): LifeCycle
- [parallel](../../devkit/documents/DefaultTasksRunnerOptions#parallel): number
- [remoteCache](../../devkit/documents/DefaultTasksRunnerOptions#remotecache): RemoteCache
- [runtimeCacheInputs](../../devkit/documents/DefaultTasksRunnerOptions#runtimecacheinputs): string[]
- [skipNxCache](../../devkit/documents/DefaultTasksRunnerOptions#skipnxcache): boolean
## Properties
+3 -3
View File
@@ -6,9 +6,9 @@ Type of dependency between projects
### Enumeration Members
- [dynamic](../../devkit/documents/DependencyType#dynamic)
- [implicit](../../devkit/documents/DependencyType#implicit)
- [static](../../devkit/documents/DependencyType#static)
- [dynamic](../../devkit/documents/DependencyType#dynamic)
- [implicit](../../devkit/documents/DependencyType#implicit)
- [static](../../devkit/documents/DependencyType#static)
## Enumeration Members
+12 -12
View File
@@ -6,18 +6,18 @@ Context that is passed into an executor
### Properties
- [configurationName](../../devkit/documents/ExecutorContext#configurationname): string
- [cwd](../../devkit/documents/ExecutorContext#cwd): string
- [isVerbose](../../devkit/documents/ExecutorContext#isverbose): boolean
- [nxJsonConfiguration](../../devkit/documents/ExecutorContext#nxjsonconfiguration): NxJsonConfiguration<string[] | "\*">
- [projectGraph](../../devkit/documents/ExecutorContext#projectgraph): ProjectGraph
- [projectName](../../devkit/documents/ExecutorContext#projectname): string
- [projectsConfigurations](../../devkit/documents/ExecutorContext#projectsconfigurations): ProjectsConfigurations
- [root](../../devkit/documents/ExecutorContext#root): string
- [target](../../devkit/documents/ExecutorContext#target): TargetConfiguration<any>
- [targetName](../../devkit/documents/ExecutorContext#targetname): string
- [taskGraph](../../devkit/documents/ExecutorContext#taskgraph): TaskGraph
- [workspace](../../devkit/documents/ExecutorContext#workspace): ProjectsConfigurations & NxJsonConfiguration<string[] | "\*">
- [configurationName](../../devkit/documents/ExecutorContext#configurationname): string
- [cwd](../../devkit/documents/ExecutorContext#cwd): string
- [isVerbose](../../devkit/documents/ExecutorContext#isverbose): boolean
- [nxJsonConfiguration](../../devkit/documents/ExecutorContext#nxjsonconfiguration): NxJsonConfiguration<string[] | "\*">
- [projectGraph](../../devkit/documents/ExecutorContext#projectgraph): ProjectGraph
- [projectName](../../devkit/documents/ExecutorContext#projectname): string
- [projectsConfigurations](../../devkit/documents/ExecutorContext#projectsconfigurations): ProjectsConfigurations
- [root](../../devkit/documents/ExecutorContext#root): string
- [target](../../devkit/documents/ExecutorContext#target): TargetConfiguration<any>
- [targetName](../../devkit/documents/ExecutorContext#targetname): string
- [taskGraph](../../devkit/documents/ExecutorContext#taskgraph): TaskGraph
- [workspace](../../devkit/documents/ExecutorContext#workspace): ProjectsConfigurations & NxJsonConfiguration<string[] | "\*">
## Properties
+2 -2
View File
@@ -4,8 +4,8 @@
### Properties
- [builders](../../devkit/documents/ExecutorsJson#builders): Record<string, ExecutorsJsonEntry>
- [executors](../../devkit/documents/ExecutorsJson#executors): Record<string, ExecutorsJsonEntry>
- [builders](../../devkit/documents/ExecutorsJson#builders): Record<string, ExecutorsJsonEntry>
- [executors](../../devkit/documents/ExecutorsJson#executors): Record<string, ExecutorsJsonEntry>
## Properties
+4 -4
View File
@@ -6,10 +6,10 @@ Description of a file change in the Nx virtual file system/
### Properties
- [content](../../devkit/documents/FileChange#content): Buffer
- [options](../../devkit/documents/FileChange#options): TreeWriteOptions
- [path](../../devkit/documents/FileChange#path): string
- [type](../../devkit/documents/FileChange#type): "CREATE" | "DELETE" | "UPDATE"
- [content](../../devkit/documents/FileChange#content): Buffer
- [options](../../devkit/documents/FileChange#options): TreeWriteOptions
- [path](../../devkit/documents/FileChange#path): string
- [type](../../devkit/documents/FileChange#type): "CREATE" | "DELETE" | "UPDATE"
## Properties
+3 -3
View File
@@ -6,9 +6,9 @@ Some metadata about a file
### Properties
- [deps](../../devkit/documents/FileData#deps): FileDataDependency[]
- [file](../../devkit/documents/FileData#file): string
- [hash](../../devkit/documents/FileData#hash): string
- [deps](../../devkit/documents/FileData#deps): FileDataDependency[]
- [file](../../devkit/documents/FileData#file): string
- [hash](../../devkit/documents/FileData#hash): string
## Properties
+2 -2
View File
@@ -4,8 +4,8 @@
### Properties
- [nonProjectFiles](../../devkit/documents/FileMap#nonprojectfiles): FileData[]
- [projectFileMap](../../devkit/documents/FileMap#projectfilemap): ProjectFileMap
- [nonProjectFiles](../../devkit/documents/FileMap#nonprojectfiles): FileData[]
- [projectFileMap](../../devkit/documents/FileMap#projectfilemap): ProjectFileMap
## Properties
+3 -3
View File
@@ -4,9 +4,9 @@
### Properties
- [extends](../../devkit/documents/GeneratorsJson#extends): string
- [generators](../../devkit/documents/GeneratorsJson#generators): Record<string, GeneratorsJsonEntry>
- [schematics](../../devkit/documents/GeneratorsJson#schematics): Record<string, GeneratorsJsonEntry>
- [extends](../../devkit/documents/GeneratorsJson#extends): string
- [generators](../../devkit/documents/GeneratorsJson#generators): Record<string, GeneratorsJsonEntry>
- [schematics](../../devkit/documents/GeneratorsJson#schematics): Record<string, GeneratorsJsonEntry>
## Properties
+2 -2
View File
@@ -6,8 +6,8 @@ A data structure returned by the default hasher.
### Properties
- [details](../../devkit/documents/Hash#details): Object
- [value](../../devkit/documents/Hash#value): string
- [details](../../devkit/documents/Hash#details): Object
- [value](../../devkit/documents/Hash#value): string
## Properties
+5 -5
View File
@@ -4,11 +4,11 @@
### Properties
- [hasher](../../devkit/documents/HasherContext#hasher): TaskHasher
- [nxJsonConfiguration](../../devkit/documents/HasherContext#nxjsonconfiguration): NxJsonConfiguration<string[] | "\*">
- [projectGraph](../../devkit/documents/HasherContext#projectgraph): ProjectGraph
- [projectsConfigurations](../../devkit/documents/HasherContext#projectsconfigurations): ProjectsConfigurations
- [taskGraph](../../devkit/documents/HasherContext#taskgraph): TaskGraph
- [hasher](../../devkit/documents/HasherContext#hasher): TaskHasher
- [nxJsonConfiguration](../../devkit/documents/HasherContext#nxjsonconfiguration): NxJsonConfiguration<string[] | "\*">
- [projectGraph](../../devkit/documents/HasherContext#projectgraph): ProjectGraph
- [projectsConfigurations](../../devkit/documents/HasherContext#projectsconfigurations): ProjectsConfigurations
- [taskGraph](../../devkit/documents/HasherContext#taskgraph): TaskGraph
## Properties
+6 -6
View File
@@ -2,18 +2,18 @@
## Hierarchy
- `ParseOptions`
- `ParseOptions`
**`JsonParseOptions`**
**`JsonParseOptions`**
## Table of contents
### Properties
- [allowEmptyContent](../../devkit/documents/JsonParseOptions#allowemptycontent): boolean
- [allowTrailingComma](../../devkit/documents/JsonParseOptions#allowtrailingcomma): boolean
- [disallowComments](../../devkit/documents/JsonParseOptions#disallowcomments): boolean
- [expectComments](../../devkit/documents/JsonParseOptions#expectcomments): boolean
- [allowEmptyContent](../../devkit/documents/JsonParseOptions#allowemptycontent): boolean
- [allowTrailingComma](../../devkit/documents/JsonParseOptions#allowtrailingcomma): boolean
- [disallowComments](../../devkit/documents/JsonParseOptions#disallowcomments): boolean
- [expectComments](../../devkit/documents/JsonParseOptions#expectcomments): boolean
## Properties
@@ -4,7 +4,7 @@
### Properties
- [spaces](../../devkit/documents/JsonSerializeOptions#spaces): number
- [spaces](../../devkit/documents/JsonSerializeOptions#spaces): number
## Properties
+6 -6
View File
@@ -4,12 +4,12 @@
### Properties
- [collection](../../devkit/documents/MigrationsJson#collection): string
- [generators](../../devkit/documents/MigrationsJson#generators): Object
- [name](../../devkit/documents/MigrationsJson#name): string
- [packageJsonUpdates](../../devkit/documents/MigrationsJson#packagejsonupdates): PackageJsonUpdates
- [schematics](../../devkit/documents/MigrationsJson#schematics): Object
- [version](../../devkit/documents/MigrationsJson#version): string
- [collection](../../devkit/documents/MigrationsJson#collection): string
- [generators](../../devkit/documents/MigrationsJson#generators): Object
- [name](../../devkit/documents/MigrationsJson#name): string
- [packageJsonUpdates](../../devkit/documents/MigrationsJson#packagejsonupdates): PackageJsonUpdates
- [schematics](../../devkit/documents/MigrationsJson#schematics): Object
- [version](../../devkit/documents/MigrationsJson#version): string
## Properties
+1 -1
View File
@@ -8,7 +8,7 @@ Use [NxJsonConfiguration#defaultBase](../../devkit/documents/NxJsonConfiguration
### Properties
- [defaultBase](../../devkit/documents/NxAffectedConfig#defaultbase): string
- [defaultBase](../../devkit/documents/NxAffectedConfig#defaultbase): string
## Properties
+24 -24
View File
@@ -10,36 +10,36 @@ Nx.json configuration
## Hierarchy
- **`NxJsonConfiguration`**
- **`NxJsonConfiguration`**
↳ [`Workspace`](../../devkit/documents/Workspace)
↳ [`Workspace`](../../devkit/documents/Workspace)
## Table of contents
### Properties
- [affected](../../devkit/documents/NxJsonConfiguration#affected): NxAffectedConfig
- [cacheDirectory](../../devkit/documents/NxJsonConfiguration#cachedirectory): string
- [cli](../../devkit/documents/NxJsonConfiguration#cli): Object
- [defaultBase](../../devkit/documents/NxJsonConfiguration#defaultbase): string
- [defaultProject](../../devkit/documents/NxJsonConfiguration#defaultproject): string
- [extends](../../devkit/documents/NxJsonConfiguration#extends): string
- [generators](../../devkit/documents/NxJsonConfiguration#generators): Object
- [implicitDependencies](../../devkit/documents/NxJsonConfiguration#implicitdependencies): ImplicitDependencyEntry<T>
- [installation](../../devkit/documents/NxJsonConfiguration#installation): NxInstallationConfiguration
- [namedInputs](../../devkit/documents/NxJsonConfiguration#namedinputs): Object
- [nxCloudAccessToken](../../devkit/documents/NxJsonConfiguration#nxcloudaccesstoken): string
- [nxCloudEncryptionKey](../../devkit/documents/NxJsonConfiguration#nxcloudencryptionkey): string
- [nxCloudUrl](../../devkit/documents/NxJsonConfiguration#nxcloudurl): string
- [parallel](../../devkit/documents/NxJsonConfiguration#parallel): number
- [plugins](../../devkit/documents/NxJsonConfiguration#plugins): PluginConfiguration[]
- [pluginsConfig](../../devkit/documents/NxJsonConfiguration#pluginsconfig): Record<string, Record<string, unknown>>
- [release](../../devkit/documents/NxJsonConfiguration#release): NxReleaseConfiguration
- [targetDefaults](../../devkit/documents/NxJsonConfiguration#targetdefaults): TargetDefaults
- [tasksRunnerOptions](../../devkit/documents/NxJsonConfiguration#tasksrunneroptions): Object
- [useDaemonProcess](../../devkit/documents/NxJsonConfiguration#usedaemonprocess): boolean
- [useInferencePlugins](../../devkit/documents/NxJsonConfiguration#useinferenceplugins): boolean
- [workspaceLayout](../../devkit/documents/NxJsonConfiguration#workspacelayout): Object
- [affected](../../devkit/documents/NxJsonConfiguration#affected): NxAffectedConfig
- [cacheDirectory](../../devkit/documents/NxJsonConfiguration#cachedirectory): string
- [cli](../../devkit/documents/NxJsonConfiguration#cli): Object
- [defaultBase](../../devkit/documents/NxJsonConfiguration#defaultbase): string
- [defaultProject](../../devkit/documents/NxJsonConfiguration#defaultproject): string
- [extends](../../devkit/documents/NxJsonConfiguration#extends): string
- [generators](../../devkit/documents/NxJsonConfiguration#generators): Object
- [implicitDependencies](../../devkit/documents/NxJsonConfiguration#implicitdependencies): ImplicitDependencyEntry<T>
- [installation](../../devkit/documents/NxJsonConfiguration#installation): NxInstallationConfiguration
- [namedInputs](../../devkit/documents/NxJsonConfiguration#namedinputs): Object
- [nxCloudAccessToken](../../devkit/documents/NxJsonConfiguration#nxcloudaccesstoken): string
- [nxCloudEncryptionKey](../../devkit/documents/NxJsonConfiguration#nxcloudencryptionkey): string
- [nxCloudUrl](../../devkit/documents/NxJsonConfiguration#nxcloudurl): string
- [parallel](../../devkit/documents/NxJsonConfiguration#parallel): number
- [plugins](../../devkit/documents/NxJsonConfiguration#plugins): PluginConfiguration[]
- [pluginsConfig](../../devkit/documents/NxJsonConfiguration#pluginsconfig): Record<string, Record<string, unknown>>
- [release](../../devkit/documents/NxJsonConfiguration#release): NxReleaseConfiguration
- [targetDefaults](../../devkit/documents/NxJsonConfiguration#targetdefaults): TargetDefaults
- [tasksRunnerOptions](../../devkit/documents/NxJsonConfiguration#tasksrunneroptions): Object
- [useDaemonProcess](../../devkit/documents/NxJsonConfiguration#usedaemonprocess): boolean
- [useInferencePlugins](../../devkit/documents/NxJsonConfiguration#useinferenceplugins): boolean
- [workspaceLayout](../../devkit/documents/NxJsonConfiguration#workspacelayout): Object
## Properties
+3 -3
View File
@@ -6,9 +6,9 @@ Specify what should be done when a file is generated but already exists on the s
### Enumeration Members
- [KeepExisting](../../devkit/documents/OverwriteStrategy#keepexisting)
- [Overwrite](../../devkit/documents/OverwriteStrategy#overwrite)
- [ThrowIfExisting](../../devkit/documents/OverwriteStrategy#throwifexisting)
- [KeepExisting](../../devkit/documents/OverwriteStrategy#keepexisting)
- [Overwrite](../../devkit/documents/OverwriteStrategy#overwrite)
- [ThrowIfExisting](../../devkit/documents/OverwriteStrategy#throwifexisting)
## Enumeration Members
+11 -11
View File
@@ -6,17 +6,17 @@ Project configuration
### Properties
- [generators](../../devkit/documents/ProjectConfiguration#generators): Object
- [implicitDependencies](../../devkit/documents/ProjectConfiguration#implicitdependencies): string[]
- [metadata](../../devkit/documents/ProjectConfiguration#metadata): ProjectMetadata
- [name](../../devkit/documents/ProjectConfiguration#name): string
- [namedInputs](../../devkit/documents/ProjectConfiguration#namedinputs): Object
- [projectType](../../devkit/documents/ProjectConfiguration#projecttype): ProjectType
- [release](../../devkit/documents/ProjectConfiguration#release): Object
- [root](../../devkit/documents/ProjectConfiguration#root): string
- [sourceRoot](../../devkit/documents/ProjectConfiguration#sourceroot): string
- [tags](../../devkit/documents/ProjectConfiguration#tags): string[]
- [targets](../../devkit/documents/ProjectConfiguration#targets): Object
- [generators](../../devkit/documents/ProjectConfiguration#generators): Object
- [implicitDependencies](../../devkit/documents/ProjectConfiguration#implicitdependencies): string[]
- [metadata](../../devkit/documents/ProjectConfiguration#metadata): ProjectMetadata
- [name](../../devkit/documents/ProjectConfiguration#name): string
- [namedInputs](../../devkit/documents/ProjectConfiguration#namedinputs): Object
- [projectType](../../devkit/documents/ProjectConfiguration#projecttype): ProjectType
- [release](../../devkit/documents/ProjectConfiguration#release): Object
- [root](../../devkit/documents/ProjectConfiguration#root): string
- [sourceRoot](../../devkit/documents/ProjectConfiguration#sourceroot): string
- [tags](../../devkit/documents/ProjectConfiguration#tags): string[]
- [targets](../../devkit/documents/ProjectConfiguration#targets): Object
## Properties
+4 -4
View File
@@ -6,10 +6,10 @@ A Graph of projects in the workspace and dependencies between them
### Properties
- [dependencies](../../devkit/documents/ProjectGraph#dependencies): Record<string, ProjectGraphDependency[]>
- [externalNodes](../../devkit/documents/ProjectGraph#externalnodes): Record<string, ProjectGraphExternalNode>
- [nodes](../../devkit/documents/ProjectGraph#nodes): Record<string, ProjectGraphProjectNode>
- [version](../../devkit/documents/ProjectGraph#version): string
- [dependencies](../../devkit/documents/ProjectGraph#dependencies): Record<string, ProjectGraphDependency[]>
- [externalNodes](../../devkit/documents/ProjectGraph#externalnodes): Record<string, ProjectGraphExternalNode>
- [nodes](../../devkit/documents/ProjectGraph#nodes): Record<string, ProjectGraphProjectNode>
- [version](../../devkit/documents/ProjectGraph#version): string
## Properties
+15 -15
View File
@@ -10,27 +10,27 @@ The ProjectGraphProcessor has been deprecated. Use a [CreateNodes](../../devkit/
### Constructors
- [constructor](../../devkit/documents/ProjectGraphBuilder#constructor)
- [constructor](../../devkit/documents/ProjectGraphBuilder#constructor)
### Properties
- [graph](../../devkit/documents/ProjectGraphBuilder#graph): ProjectGraph
- [removedEdges](../../devkit/documents/ProjectGraphBuilder#removededges): Object
- [graph](../../devkit/documents/ProjectGraphBuilder#graph): ProjectGraph
- [removedEdges](../../devkit/documents/ProjectGraphBuilder#removededges): Object
### Methods
- [addDependency](../../devkit/documents/ProjectGraphBuilder#adddependency)
- [addDynamicDependency](../../devkit/documents/ProjectGraphBuilder#adddynamicdependency)
- [addExplicitDependency](../../devkit/documents/ProjectGraphBuilder#addexplicitdependency)
- [addExternalNode](../../devkit/documents/ProjectGraphBuilder#addexternalnode)
- [addImplicitDependency](../../devkit/documents/ProjectGraphBuilder#addimplicitdependency)
- [addNode](../../devkit/documents/ProjectGraphBuilder#addnode)
- [addStaticDependency](../../devkit/documents/ProjectGraphBuilder#addstaticdependency)
- [getUpdatedProjectGraph](../../devkit/documents/ProjectGraphBuilder#getupdatedprojectgraph)
- [mergeProjectGraph](../../devkit/documents/ProjectGraphBuilder#mergeprojectgraph)
- [removeDependency](../../devkit/documents/ProjectGraphBuilder#removedependency)
- [removeNode](../../devkit/documents/ProjectGraphBuilder#removenode)
- [setVersion](../../devkit/documents/ProjectGraphBuilder#setversion)
- [addDependency](../../devkit/documents/ProjectGraphBuilder#adddependency)
- [addDynamicDependency](../../devkit/documents/ProjectGraphBuilder#adddynamicdependency)
- [addExplicitDependency](../../devkit/documents/ProjectGraphBuilder#addexplicitdependency)
- [addExternalNode](../../devkit/documents/ProjectGraphBuilder#addexternalnode)
- [addImplicitDependency](../../devkit/documents/ProjectGraphBuilder#addimplicitdependency)
- [addNode](../../devkit/documents/ProjectGraphBuilder#addnode)
- [addStaticDependency](../../devkit/documents/ProjectGraphBuilder#addstaticdependency)
- [getUpdatedProjectGraph](../../devkit/documents/ProjectGraphBuilder#getupdatedprojectgraph)
- [mergeProjectGraph](../../devkit/documents/ProjectGraphBuilder#mergeprojectgraph)
- [removeDependency](../../devkit/documents/ProjectGraphBuilder#removedependency)
- [removeNode](../../devkit/documents/ProjectGraphBuilder#removenode)
- [setVersion](../../devkit/documents/ProjectGraphBuilder#setversion)
## Constructors
@@ -6,9 +6,9 @@ A dependency between two projects
### Properties
- [source](../../devkit/documents/ProjectGraphDependency#source): string
- [target](../../devkit/documents/ProjectGraphDependency#target): string
- [type](../../devkit/documents/ProjectGraphDependency#type): string
- [source](../../devkit/documents/ProjectGraphDependency#source): string
- [target](../../devkit/documents/ProjectGraphDependency#target): string
- [type](../../devkit/documents/ProjectGraphDependency#type): string
## Properties
@@ -3,8 +3,8 @@
A node describing an external dependency
`name` has as form of:
- `npm:packageName` for root dependencies or
- `npm:packageName@version` for nested transitive dependencies
- `npm:packageName` for root dependencies or
- `npm:packageName@version` for nested transitive dependencies
This is vital for our node discovery to always point to root dependencies,
while allowing tracking of the full tree of different nested versions
@@ -13,9 +13,9 @@ while allowing tracking of the full tree of different nested versions
### Properties
- [data](../../devkit/documents/ProjectGraphExternalNode#data): Object
- [name](../../devkit/documents/ProjectGraphExternalNode#name): `npm:${string}`
- [type](../../devkit/documents/ProjectGraphExternalNode#type): "npm"
- [data](../../devkit/documents/ProjectGraphExternalNode#data): Object
- [name](../../devkit/documents/ProjectGraphExternalNode#name): `npm:${string}`
- [type](../../devkit/documents/ProjectGraphExternalNode#type): "npm"
## Properties
@@ -10,11 +10,11 @@ The ProjectGraphProcessor is deprecated. This will be removed in Nx 20.
### Properties
- [fileMap](../../devkit/documents/ProjectGraphProcessorContext#filemap): ProjectFileMap
- [filesToProcess](../../devkit/documents/ProjectGraphProcessorContext#filestoprocess): ProjectFileMap
- [nxJsonConfiguration](../../devkit/documents/ProjectGraphProcessorContext#nxjsonconfiguration): NxJsonConfiguration<string[] | "\*">
- [projectsConfigurations](../../devkit/documents/ProjectGraphProcessorContext#projectsconfigurations): ProjectsConfigurations
- [workspace](../../devkit/documents/ProjectGraphProcessorContext#workspace): Workspace
- [fileMap](../../devkit/documents/ProjectGraphProcessorContext#filemap): ProjectFileMap
- [filesToProcess](../../devkit/documents/ProjectGraphProcessorContext#filestoprocess): ProjectFileMap
- [nxJsonConfiguration](../../devkit/documents/ProjectGraphProcessorContext#nxjsonconfiguration): NxJsonConfiguration<string[] | "\*">
- [projectsConfigurations](../../devkit/documents/ProjectGraphProcessorContext#projectsconfigurations): ProjectsConfigurations
- [workspace](../../devkit/documents/ProjectGraphProcessorContext#workspace): Workspace
## Properties
@@ -6,9 +6,9 @@ A node describing a project in a workspace
### Properties
- [data](../../devkit/documents/ProjectGraphProjectNode#data): ProjectConfiguration & Object
- [name](../../devkit/documents/ProjectGraphProjectNode#name): string
- [type](../../devkit/documents/ProjectGraphProjectNode#type): "app" | "e2e" | "lib"
- [data](../../devkit/documents/ProjectGraphProjectNode#data): ProjectConfiguration & Object
- [name](../../devkit/documents/ProjectGraphProjectNode#name): string
- [type](../../devkit/documents/ProjectGraphProjectNode#type): "app" | "e2e" | "lib"
## Properties
@@ -4,16 +4,16 @@ Projects Configurations
## Hierarchy
- **`ProjectsConfigurations`**
- **`ProjectsConfigurations`**
↳ [`Workspace`](../../devkit/documents/Workspace)
↳ [`Workspace`](../../devkit/documents/Workspace)
## Table of contents
### Properties
- [projects](../../devkit/documents/ProjectsConfigurations#projects): Object
- [version](../../devkit/documents/ProjectsConfigurations#version): number
- [projects](../../devkit/documents/ProjectsConfigurations#projects): Object
- [version](../../devkit/documents/ProjectsConfigurations#version): number
## Properties
+142 -142
View File
@@ -13,160 +13,160 @@ It only uses language primitives and immutable objects
### Enumerations
- [ChangeType](../../devkit/documents/ChangeType)
- [DependencyType](../../devkit/documents/DependencyType)
- [OverwriteStrategy](../../devkit/documents/OverwriteStrategy)
- [ChangeType](../../devkit/documents/ChangeType)
- [DependencyType](../../devkit/documents/DependencyType)
- [OverwriteStrategy](../../devkit/documents/OverwriteStrategy)
### Classes
- [AggregateCreateNodesError](../../devkit/documents/AggregateCreateNodesError)
- [ProjectGraphBuilder](../../devkit/documents/ProjectGraphBuilder)
- [AggregateCreateNodesError](../../devkit/documents/AggregateCreateNodesError)
- [ProjectGraphBuilder](../../devkit/documents/ProjectGraphBuilder)
### Interfaces
- [CreateDependenciesContext](../../devkit/documents/CreateDependenciesContext)
- [CreateNodesContext](../../devkit/documents/CreateNodesContext)
- [CreateNodesContextV2](../../devkit/documents/CreateNodesContextV2)
- [CreateNodesResult](../../devkit/documents/CreateNodesResult)
- [DefaultTasksRunnerOptions](../../devkit/documents/DefaultTasksRunnerOptions)
- [ExecutorContext](../../devkit/documents/ExecutorContext)
- [ExecutorsJson](../../devkit/documents/ExecutorsJson)
- [FileChange](../../devkit/documents/FileChange)
- [FileData](../../devkit/documents/FileData)
- [FileMap](../../devkit/documents/FileMap)
- [GeneratorsJson](../../devkit/documents/GeneratorsJson)
- [Hash](../../devkit/documents/Hash)
- [HasherContext](../../devkit/documents/HasherContext)
- [ImplicitJsonSubsetDependency](../../devkit/documents/ImplicitJsonSubsetDependency)
- [JsonParseOptions](../../devkit/documents/JsonParseOptions)
- [JsonSerializeOptions](../../devkit/documents/JsonSerializeOptions)
- [MigrationsJson](../../devkit/documents/MigrationsJson)
- [NxAffectedConfig](../../devkit/documents/NxAffectedConfig)
- [NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration)
- [ProjectConfiguration](../../devkit/documents/ProjectConfiguration)
- [ProjectFileMap](../../devkit/documents/ProjectFileMap)
- [ProjectGraph](../../devkit/documents/ProjectGraph)
- [ProjectGraphDependency](../../devkit/documents/ProjectGraphDependency)
- [ProjectGraphExternalNode](../../devkit/documents/ProjectGraphExternalNode)
- [ProjectGraphProcessorContext](../../devkit/documents/ProjectGraphProcessorContext)
- [ProjectGraphProjectNode](../../devkit/documents/ProjectGraphProjectNode)
- [ProjectsConfigurations](../../devkit/documents/ProjectsConfigurations)
- [RemoteCache](../../devkit/documents/RemoteCache)
- [StringDeletion](../../devkit/documents/StringDeletion)
- [StringInsertion](../../devkit/documents/StringInsertion)
- [Target](../../devkit/documents/Target)
- [TargetConfiguration](../../devkit/documents/TargetConfiguration)
- [TargetDependencyConfig](../../devkit/documents/TargetDependencyConfig)
- [Task](../../devkit/documents/Task)
- [TaskGraph](../../devkit/documents/TaskGraph)
- [TaskHasher](../../devkit/documents/TaskHasher)
- [Tree](../../devkit/documents/Tree)
- [Workspace](../../devkit/documents/Workspace)
- [CreateDependenciesContext](../../devkit/documents/CreateDependenciesContext)
- [CreateNodesContext](../../devkit/documents/CreateNodesContext)
- [CreateNodesContextV2](../../devkit/documents/CreateNodesContextV2)
- [CreateNodesResult](../../devkit/documents/CreateNodesResult)
- [DefaultTasksRunnerOptions](../../devkit/documents/DefaultTasksRunnerOptions)
- [ExecutorContext](../../devkit/documents/ExecutorContext)
- [ExecutorsJson](../../devkit/documents/ExecutorsJson)
- [FileChange](../../devkit/documents/FileChange)
- [FileData](../../devkit/documents/FileData)
- [FileMap](../../devkit/documents/FileMap)
- [GeneratorsJson](../../devkit/documents/GeneratorsJson)
- [Hash](../../devkit/documents/Hash)
- [HasherContext](../../devkit/documents/HasherContext)
- [ImplicitJsonSubsetDependency](../../devkit/documents/ImplicitJsonSubsetDependency)
- [JsonParseOptions](../../devkit/documents/JsonParseOptions)
- [JsonSerializeOptions](../../devkit/documents/JsonSerializeOptions)
- [MigrationsJson](../../devkit/documents/MigrationsJson)
- [NxAffectedConfig](../../devkit/documents/NxAffectedConfig)
- [NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration)
- [ProjectConfiguration](../../devkit/documents/ProjectConfiguration)
- [ProjectFileMap](../../devkit/documents/ProjectFileMap)
- [ProjectGraph](../../devkit/documents/ProjectGraph)
- [ProjectGraphDependency](../../devkit/documents/ProjectGraphDependency)
- [ProjectGraphExternalNode](../../devkit/documents/ProjectGraphExternalNode)
- [ProjectGraphProcessorContext](../../devkit/documents/ProjectGraphProcessorContext)
- [ProjectGraphProjectNode](../../devkit/documents/ProjectGraphProjectNode)
- [ProjectsConfigurations](../../devkit/documents/ProjectsConfigurations)
- [RemoteCache](../../devkit/documents/RemoteCache)
- [StringDeletion](../../devkit/documents/StringDeletion)
- [StringInsertion](../../devkit/documents/StringInsertion)
- [Target](../../devkit/documents/Target)
- [TargetConfiguration](../../devkit/documents/TargetConfiguration)
- [TargetDependencyConfig](../../devkit/documents/TargetDependencyConfig)
- [Task](../../devkit/documents/Task)
- [TaskGraph](../../devkit/documents/TaskGraph)
- [TaskHasher](../../devkit/documents/TaskHasher)
- [Tree](../../devkit/documents/Tree)
- [Workspace](../../devkit/documents/Workspace)
### Type Aliases
- [AsyncIteratorExecutor](../../devkit/documents/AsyncIteratorExecutor)
- [CreateDependencies](../../devkit/documents/CreateDependencies)
- [CreateMetadata](../../devkit/documents/CreateMetadata)
- [CreateMetadataContext](../../devkit/documents/CreateMetadataContext)
- [CreateNodes](../../devkit/documents/CreateNodes)
- [CreateNodesFunction](../../devkit/documents/CreateNodesFunction)
- [CreateNodesFunctionV2](../../devkit/documents/CreateNodesFunctionV2)
- [CreateNodesResultV2](../../devkit/documents/CreateNodesResultV2)
- [CreateNodesV2](../../devkit/documents/CreateNodesV2)
- [CustomHasher](../../devkit/documents/CustomHasher)
- [DynamicDependency](../../devkit/documents/DynamicDependency)
- [Executor](../../devkit/documents/Executor)
- [ExpandedPluginConfiguration](../../devkit/documents/ExpandedPluginConfiguration)
- [Generator](../../devkit/documents/Generator)
- [GeneratorCallback](../../devkit/documents/GeneratorCallback)
- [Hasher](../../devkit/documents/Hasher)
- [ImplicitDependency](../../devkit/documents/ImplicitDependency)
- [ImplicitDependencyEntry](../../devkit/documents/ImplicitDependencyEntry)
- [NxPlugin](../../devkit/documents/NxPlugin)
- [NxPluginV1](../../devkit/documents/NxPluginV1)
- [NxPluginV2](../../devkit/documents/NxPluginV2)
- [PackageManager](../../devkit/documents/PackageManager)
- [PluginConfiguration](../../devkit/documents/PluginConfiguration)
- [ProjectGraphNode](../../devkit/documents/ProjectGraphNode)
- [ProjectTargetConfigurator](../../devkit/documents/ProjectTargetConfigurator)
- [ProjectType](../../devkit/documents/ProjectType)
- [ProjectsMetadata](../../devkit/documents/ProjectsMetadata)
- [PromiseExecutor](../../devkit/documents/PromiseExecutor)
- [RawProjectGraphDependency](../../devkit/documents/RawProjectGraphDependency)
- [StaticDependency](../../devkit/documents/StaticDependency)
- [StringChange](../../devkit/documents/StringChange)
- [TargetDefaults](../../devkit/documents/TargetDefaults)
- [TaskGraphExecutor](../../devkit/documents/TaskGraphExecutor)
- [ToJSOptions](../../devkit/documents/ToJSOptions)
- [WorkspaceJsonConfiguration](../../devkit/documents/WorkspaceJsonConfiguration)
- [AsyncIteratorExecutor](../../devkit/documents/AsyncIteratorExecutor)
- [CreateDependencies](../../devkit/documents/CreateDependencies)
- [CreateMetadata](../../devkit/documents/CreateMetadata)
- [CreateMetadataContext](../../devkit/documents/CreateMetadataContext)
- [CreateNodes](../../devkit/documents/CreateNodes)
- [CreateNodesFunction](../../devkit/documents/CreateNodesFunction)
- [CreateNodesFunctionV2](../../devkit/documents/CreateNodesFunctionV2)
- [CreateNodesResultV2](../../devkit/documents/CreateNodesResultV2)
- [CreateNodesV2](../../devkit/documents/CreateNodesV2)
- [CustomHasher](../../devkit/documents/CustomHasher)
- [DynamicDependency](../../devkit/documents/DynamicDependency)
- [Executor](../../devkit/documents/Executor)
- [ExpandedPluginConfiguration](../../devkit/documents/ExpandedPluginConfiguration)
- [Generator](../../devkit/documents/Generator)
- [GeneratorCallback](../../devkit/documents/GeneratorCallback)
- [Hasher](../../devkit/documents/Hasher)
- [ImplicitDependency](../../devkit/documents/ImplicitDependency)
- [ImplicitDependencyEntry](../../devkit/documents/ImplicitDependencyEntry)
- [NxPlugin](../../devkit/documents/NxPlugin)
- [NxPluginV1](../../devkit/documents/NxPluginV1)
- [NxPluginV2](../../devkit/documents/NxPluginV2)
- [PackageManager](../../devkit/documents/PackageManager)
- [PluginConfiguration](../../devkit/documents/PluginConfiguration)
- [ProjectGraphNode](../../devkit/documents/ProjectGraphNode)
- [ProjectTargetConfigurator](../../devkit/documents/ProjectTargetConfigurator)
- [ProjectType](../../devkit/documents/ProjectType)
- [ProjectsMetadata](../../devkit/documents/ProjectsMetadata)
- [PromiseExecutor](../../devkit/documents/PromiseExecutor)
- [RawProjectGraphDependency](../../devkit/documents/RawProjectGraphDependency)
- [StaticDependency](../../devkit/documents/StaticDependency)
- [StringChange](../../devkit/documents/StringChange)
- [TargetDefaults](../../devkit/documents/TargetDefaults)
- [TaskGraphExecutor](../../devkit/documents/TaskGraphExecutor)
- [ToJSOptions](../../devkit/documents/ToJSOptions)
- [WorkspaceJsonConfiguration](../../devkit/documents/WorkspaceJsonConfiguration)
### Variables
- [NX_VERSION](../../devkit/documents/NX_VERSION): string
- [appRootPath](../../devkit/documents/appRootPath): string
- [cacheDir](../../devkit/documents/cacheDir): string
- [logger](../../devkit/documents/logger): Object
- [output](../../devkit/documents/output): CLIOutput
- [workspaceRoot](../../devkit/documents/workspaceRoot): string
- [NX_VERSION](../../devkit/documents/NX_VERSION): string
- [appRootPath](../../devkit/documents/appRootPath): string
- [cacheDir](../../devkit/documents/cacheDir): string
- [logger](../../devkit/documents/logger): Object
- [output](../../devkit/documents/output): CLIOutput
- [workspaceRoot](../../devkit/documents/workspaceRoot): string
### Functions
- [addDependenciesToPackageJson](../../devkit/documents/addDependenciesToPackageJson)
- [addProjectConfiguration](../../devkit/documents/addProjectConfiguration)
- [applyChangesToString](../../devkit/documents/applyChangesToString)
- [convertNxExecutor](../../devkit/documents/convertNxExecutor)
- [convertNxGenerator](../../devkit/documents/convertNxGenerator)
- [createNodesFromFiles](../../devkit/documents/createNodesFromFiles)
- [createProjectFileMapUsingProjectGraph](../../devkit/documents/createProjectFileMapUsingProjectGraph)
- [createProjectGraphAsync](../../devkit/documents/createProjectGraphAsync)
- [defaultTasksRunner](../../devkit/documents/defaultTasksRunner)
- [detectPackageManager](../../devkit/documents/detectPackageManager)
- [ensurePackage](../../devkit/documents/ensurePackage)
- [extractLayoutDirectory](../../devkit/documents/extractLayoutDirectory)
- [formatFiles](../../devkit/documents/formatFiles)
- [generateFiles](../../devkit/documents/generateFiles)
- [getOutputsForTargetAndConfiguration](../../devkit/documents/getOutputsForTargetAndConfiguration)
- [getPackageManagerCommand](../../devkit/documents/getPackageManagerCommand)
- [getPackageManagerVersion](../../devkit/documents/getPackageManagerVersion)
- [getProjects](../../devkit/documents/getProjects)
- [getWorkspaceLayout](../../devkit/documents/getWorkspaceLayout)
- [glob](../../devkit/documents/glob)
- [globAsync](../../devkit/documents/globAsync)
- [hashArray](../../devkit/documents/hashArray)
- [installPackagesTask](../../devkit/documents/installPackagesTask)
- [isDaemonEnabled](../../devkit/documents/isDaemonEnabled)
- [isWorkspacesEnabled](../../devkit/documents/isWorkspacesEnabled)
- [joinPathFragments](../../devkit/documents/joinPathFragments)
- [moveFilesToNewDirectory](../../devkit/documents/moveFilesToNewDirectory)
- [names](../../devkit/documents/names)
- [normalizePath](../../devkit/documents/normalizePath)
- [offsetFromRoot](../../devkit/documents/offsetFromRoot)
- [parseJson](../../devkit/documents/parseJson)
- [parseTargetString](../../devkit/documents/parseTargetString)
- [readCachedProjectGraph](../../devkit/documents/readCachedProjectGraph)
- [readJson](../../devkit/documents/readJson)
- [readJsonFile](../../devkit/documents/readJsonFile)
- [readNxJson](../../devkit/documents/readNxJson)
- [readProjectConfiguration](../../devkit/documents/readProjectConfiguration)
- [readProjectsConfigurationFromProjectGraph](../../devkit/documents/readProjectsConfigurationFromProjectGraph)
- [readTargetOptions](../../devkit/documents/readTargetOptions)
- [removeDependenciesFromPackageJson](../../devkit/documents/removeDependenciesFromPackageJson)
- [removeProjectConfiguration](../../devkit/documents/removeProjectConfiguration)
- [reverse](../../devkit/documents/reverse)
- [runExecutor](../../devkit/documents/runExecutor)
- [runTasksInSerial](../../devkit/documents/runTasksInSerial)
- [serializeJson](../../devkit/documents/serializeJson)
- [stripIndents](../../devkit/documents/stripIndents)
- [stripJsonComments](../../devkit/documents/stripJsonComments)
- [targetToTargetString](../../devkit/documents/targetToTargetString)
- [toJS](../../devkit/documents/toJS)
- [updateJson](../../devkit/documents/updateJson)
- [updateNxJson](../../devkit/documents/updateNxJson)
- [updateProjectConfiguration](../../devkit/documents/updateProjectConfiguration)
- [updateTsConfigsToJs](../../devkit/documents/updateTsConfigsToJs)
- [validateDependency](../../devkit/documents/validateDependency)
- [visitNotIgnoredFiles](../../devkit/documents/visitNotIgnoredFiles)
- [workspaceLayout](../../devkit/documents/workspaceLayout)
- [writeJson](../../devkit/documents/writeJson)
- [writeJsonFile](../../devkit/documents/writeJsonFile)
- [addDependenciesToPackageJson](../../devkit/documents/addDependenciesToPackageJson)
- [addProjectConfiguration](../../devkit/documents/addProjectConfiguration)
- [applyChangesToString](../../devkit/documents/applyChangesToString)
- [convertNxExecutor](../../devkit/documents/convertNxExecutor)
- [convertNxGenerator](../../devkit/documents/convertNxGenerator)
- [createNodesFromFiles](../../devkit/documents/createNodesFromFiles)
- [createProjectFileMapUsingProjectGraph](../../devkit/documents/createProjectFileMapUsingProjectGraph)
- [createProjectGraphAsync](../../devkit/documents/createProjectGraphAsync)
- [defaultTasksRunner](../../devkit/documents/defaultTasksRunner)
- [detectPackageManager](../../devkit/documents/detectPackageManager)
- [ensurePackage](../../devkit/documents/ensurePackage)
- [extractLayoutDirectory](../../devkit/documents/extractLayoutDirectory)
- [formatFiles](../../devkit/documents/formatFiles)
- [generateFiles](../../devkit/documents/generateFiles)
- [getOutputsForTargetAndConfiguration](../../devkit/documents/getOutputsForTargetAndConfiguration)
- [getPackageManagerCommand](../../devkit/documents/getPackageManagerCommand)
- [getPackageManagerVersion](../../devkit/documents/getPackageManagerVersion)
- [getProjects](../../devkit/documents/getProjects)
- [getWorkspaceLayout](../../devkit/documents/getWorkspaceLayout)
- [glob](../../devkit/documents/glob)
- [globAsync](../../devkit/documents/globAsync)
- [hashArray](../../devkit/documents/hashArray)
- [installPackagesTask](../../devkit/documents/installPackagesTask)
- [isDaemonEnabled](../../devkit/documents/isDaemonEnabled)
- [isWorkspacesEnabled](../../devkit/documents/isWorkspacesEnabled)
- [joinPathFragments](../../devkit/documents/joinPathFragments)
- [moveFilesToNewDirectory](../../devkit/documents/moveFilesToNewDirectory)
- [names](../../devkit/documents/names)
- [normalizePath](../../devkit/documents/normalizePath)
- [offsetFromRoot](../../devkit/documents/offsetFromRoot)
- [parseJson](../../devkit/documents/parseJson)
- [parseTargetString](../../devkit/documents/parseTargetString)
- [readCachedProjectGraph](../../devkit/documents/readCachedProjectGraph)
- [readJson](../../devkit/documents/readJson)
- [readJsonFile](../../devkit/documents/readJsonFile)
- [readNxJson](../../devkit/documents/readNxJson)
- [readProjectConfiguration](../../devkit/documents/readProjectConfiguration)
- [readProjectsConfigurationFromProjectGraph](../../devkit/documents/readProjectsConfigurationFromProjectGraph)
- [readTargetOptions](../../devkit/documents/readTargetOptions)
- [removeDependenciesFromPackageJson](../../devkit/documents/removeDependenciesFromPackageJson)
- [removeProjectConfiguration](../../devkit/documents/removeProjectConfiguration)
- [reverse](../../devkit/documents/reverse)
- [runExecutor](../../devkit/documents/runExecutor)
- [runTasksInSerial](../../devkit/documents/runTasksInSerial)
- [serializeJson](../../devkit/documents/serializeJson)
- [stripIndents](../../devkit/documents/stripIndents)
- [stripJsonComments](../../devkit/documents/stripJsonComments)
- [targetToTargetString](../../devkit/documents/targetToTargetString)
- [toJS](../../devkit/documents/toJS)
- [updateJson](../../devkit/documents/updateJson)
- [updateNxJson](../../devkit/documents/updateNxJson)
- [updateProjectConfiguration](../../devkit/documents/updateProjectConfiguration)
- [updateTsConfigsToJs](../../devkit/documents/updateTsConfigsToJs)
- [validateDependency](../../devkit/documents/validateDependency)
- [visitNotIgnoredFiles](../../devkit/documents/visitNotIgnoredFiles)
- [workspaceLayout](../../devkit/documents/workspaceLayout)
- [writeJson](../../devkit/documents/writeJson)
- [writeJsonFile](../../devkit/documents/writeJsonFile)
+2 -2
View File
@@ -4,8 +4,8 @@
### Properties
- [retrieve](../../devkit/documents/RemoteCache#retrieve): Function
- [store](../../devkit/documents/RemoteCache#store): Function
- [retrieve](../../devkit/documents/RemoteCache#retrieve): Function
- [store](../../devkit/documents/RemoteCache#store): Function
## Properties
+3 -3
View File
@@ -4,9 +4,9 @@
### Properties
- [length](../../devkit/documents/StringDeletion#length): number
- [start](../../devkit/documents/StringDeletion#start): number
- [type](../../devkit/documents/StringDeletion#type): Delete
- [length](../../devkit/documents/StringDeletion#length): number
- [start](../../devkit/documents/StringDeletion#start): number
- [type](../../devkit/documents/StringDeletion#type): Delete
## Properties
+3 -3
View File
@@ -4,9 +4,9 @@
### Properties
- [index](../../devkit/documents/StringInsertion#index): number
- [text](../../devkit/documents/StringInsertion#text): string
- [type](../../devkit/documents/StringInsertion#type): Insert
- [index](../../devkit/documents/StringInsertion#index): number
- [text](../../devkit/documents/StringInsertion#text): string
- [type](../../devkit/documents/StringInsertion#type): Insert
## Properties
+3 -3
View File
@@ -4,9 +4,9 @@
### Properties
- [configuration](../../devkit/documents/Target#configuration): string
- [project](../../devkit/documents/Target#project): string
- [target](../../devkit/documents/Target#target): string
- [configuration](../../devkit/documents/Target#configuration): string
- [project](../../devkit/documents/Target#project): string
- [target](../../devkit/documents/Target#target): string
## Properties
+11 -11
View File
@@ -12,17 +12,17 @@ Target's configuration
### Properties
- [cache](../../devkit/documents/TargetConfiguration#cache): boolean
- [command](../../devkit/documents/TargetConfiguration#command): string
- [configurations](../../devkit/documents/TargetConfiguration#configurations): Object
- [defaultConfiguration](../../devkit/documents/TargetConfiguration#defaultconfiguration): string
- [dependsOn](../../devkit/documents/TargetConfiguration#dependson): (string | TargetDependencyConfig)[]
- [executor](../../devkit/documents/TargetConfiguration#executor): string
- [inputs](../../devkit/documents/TargetConfiguration#inputs): (string | InputDefinition)[]
- [metadata](../../devkit/documents/TargetConfiguration#metadata): TargetMetadata
- [options](../../devkit/documents/TargetConfiguration#options): T
- [outputs](../../devkit/documents/TargetConfiguration#outputs): string[]
- [parallelism](../../devkit/documents/TargetConfiguration#parallelism): boolean
- [cache](../../devkit/documents/TargetConfiguration#cache): boolean
- [command](../../devkit/documents/TargetConfiguration#command): string
- [configurations](../../devkit/documents/TargetConfiguration#configurations): Object
- [defaultConfiguration](../../devkit/documents/TargetConfiguration#defaultconfiguration): string
- [dependsOn](../../devkit/documents/TargetConfiguration#dependson): (string | TargetDependencyConfig)[]
- [executor](../../devkit/documents/TargetConfiguration#executor): string
- [inputs](../../devkit/documents/TargetConfiguration#inputs): (string | InputDefinition)[]
- [metadata](../../devkit/documents/TargetConfiguration#metadata): TargetMetadata
- [options](../../devkit/documents/TargetConfiguration#options): T
- [outputs](../../devkit/documents/TargetConfiguration#outputs): string[]
- [parallelism](../../devkit/documents/TargetConfiguration#parallelism): boolean
## Properties
@@ -4,10 +4,10 @@
### Properties
- [dependencies](../../devkit/documents/TargetDependencyConfig#dependencies): boolean
- [params](../../devkit/documents/TargetDependencyConfig#params): "ignore" | "forward"
- [projects](../../devkit/documents/TargetDependencyConfig#projects): string | string[]
- [target](../../devkit/documents/TargetDependencyConfig#target): string
- [dependencies](../../devkit/documents/TargetDependencyConfig#dependencies): boolean
- [params](../../devkit/documents/TargetDependencyConfig#params): "ignore" | "forward"
- [projects](../../devkit/documents/TargetDependencyConfig#projects): string | string[]
- [target](../../devkit/documents/TargetDependencyConfig#target): string
## Properties
+11 -11
View File
@@ -6,17 +6,17 @@ A representation of the invocation of an Executor
### Properties
- [cache](../../devkit/documents/Task#cache): boolean
- [endTime](../../devkit/documents/Task#endtime): number
- [hash](../../devkit/documents/Task#hash): string
- [hashDetails](../../devkit/documents/Task#hashdetails): Object
- [id](../../devkit/documents/Task#id): string
- [outputs](../../devkit/documents/Task#outputs): string[]
- [overrides](../../devkit/documents/Task#overrides): any
- [parallelism](../../devkit/documents/Task#parallelism): boolean
- [projectRoot](../../devkit/documents/Task#projectroot): string
- [startTime](../../devkit/documents/Task#starttime): number
- [target](../../devkit/documents/Task#target): Object
- [cache](../../devkit/documents/Task#cache): boolean
- [endTime](../../devkit/documents/Task#endtime): number
- [hash](../../devkit/documents/Task#hash): string
- [hashDetails](../../devkit/documents/Task#hashdetails): Object
- [id](../../devkit/documents/Task#id): string
- [outputs](../../devkit/documents/Task#outputs): string[]
- [overrides](../../devkit/documents/Task#overrides): any
- [parallelism](../../devkit/documents/Task#parallelism): boolean
- [projectRoot](../../devkit/documents/Task#projectroot): string
- [startTime](../../devkit/documents/Task#starttime): number
- [target](../../devkit/documents/Task#target): Object
## Properties
+3 -3
View File
@@ -6,9 +6,9 @@ Graph of Tasks to be executed
### Properties
- [dependencies](../../devkit/documents/TaskGraph#dependencies): Record<string, string[]>
- [roots](../../devkit/documents/TaskGraph#roots): string[]
- [tasks](../../devkit/documents/TaskGraph#tasks): Record<string, Task>
- [dependencies](../../devkit/documents/TaskGraph#dependencies): Record<string, string[]>
- [roots](../../devkit/documents/TaskGraph#roots): string[]
- [tasks](../../devkit/documents/TaskGraph#tasks): Record<string, Task>
## Properties
+2 -2
View File
@@ -4,8 +4,8 @@
### Methods
- [hashTask](../../devkit/documents/TaskHasher#hashtask)
- [hashTasks](../../devkit/documents/TaskHasher#hashtasks)
- [hashTask](../../devkit/documents/TaskHasher#hashtask)
- [hashTasks](../../devkit/documents/TaskHasher#hashtasks)
## Methods
+10 -10
View File
@@ -6,19 +6,19 @@ Virtual file system tree.
### Properties
- [root](../../devkit/documents/Tree#root): string
- [root](../../devkit/documents/Tree#root): string
### Methods
- [changePermissions](../../devkit/documents/Tree#changepermissions)
- [children](../../devkit/documents/Tree#children)
- [delete](../../devkit/documents/Tree#delete)
- [exists](../../devkit/documents/Tree#exists)
- [isFile](../../devkit/documents/Tree#isfile)
- [listChanges](../../devkit/documents/Tree#listchanges)
- [read](../../devkit/documents/Tree#read)
- [rename](../../devkit/documents/Tree#rename)
- [write](../../devkit/documents/Tree#write)
- [changePermissions](../../devkit/documents/Tree#changepermissions)
- [children](../../devkit/documents/Tree#children)
- [delete](../../devkit/documents/Tree#delete)
- [exists](../../devkit/documents/Tree#exists)
- [isFile](../../devkit/documents/Tree#isfile)
- [listChanges](../../devkit/documents/Tree#listchanges)
- [read](../../devkit/documents/Tree#read)
- [rename](../../devkit/documents/Tree#rename)
- [write](../../devkit/documents/Tree#write)
## Properties
+27 -27
View File
@@ -6,40 +6,40 @@ use ProjectsConfigurations or NxJsonConfiguration
## Hierarchy
- [`ProjectsConfigurations`](../../devkit/documents/ProjectsConfigurations)
- [`ProjectsConfigurations`](../../devkit/documents/ProjectsConfigurations)
- [`NxJsonConfiguration`](../../devkit/documents/NxJsonConfiguration)
- [`NxJsonConfiguration`](../../devkit/documents/NxJsonConfiguration)
**`Workspace`**
**`Workspace`**
## Table of contents
### Properties
- [affected](../../devkit/documents/Workspace#affected): NxAffectedConfig
- [cacheDirectory](../../devkit/documents/Workspace#cachedirectory): string
- [cli](../../devkit/documents/Workspace#cli): Object
- [defaultBase](../../devkit/documents/Workspace#defaultbase): string
- [defaultProject](../../devkit/documents/Workspace#defaultproject): string
- [extends](../../devkit/documents/Workspace#extends): string
- [generators](../../devkit/documents/Workspace#generators): Object
- [implicitDependencies](../../devkit/documents/Workspace#implicitdependencies): ImplicitDependencyEntry<string[] | "\*">
- [installation](../../devkit/documents/Workspace#installation): NxInstallationConfiguration
- [namedInputs](../../devkit/documents/Workspace#namedinputs): Object
- [nxCloudAccessToken](../../devkit/documents/Workspace#nxcloudaccesstoken): string
- [nxCloudEncryptionKey](../../devkit/documents/Workspace#nxcloudencryptionkey): string
- [nxCloudUrl](../../devkit/documents/Workspace#nxcloudurl): string
- [parallel](../../devkit/documents/Workspace#parallel): number
- [plugins](../../devkit/documents/Workspace#plugins): PluginConfiguration[]
- [pluginsConfig](../../devkit/documents/Workspace#pluginsconfig): Record<string, Record<string, unknown>>
- [projects](../../devkit/documents/Workspace#projects): Record<string, ProjectConfiguration>
- [release](../../devkit/documents/Workspace#release): NxReleaseConfiguration
- [targetDefaults](../../devkit/documents/Workspace#targetdefaults): TargetDefaults
- [tasksRunnerOptions](../../devkit/documents/Workspace#tasksrunneroptions): Object
- [useDaemonProcess](../../devkit/documents/Workspace#usedaemonprocess): boolean
- [useInferencePlugins](../../devkit/documents/Workspace#useinferenceplugins): boolean
- [version](../../devkit/documents/Workspace#version): number
- [workspaceLayout](../../devkit/documents/Workspace#workspacelayout): Object
- [affected](../../devkit/documents/Workspace#affected): NxAffectedConfig
- [cacheDirectory](../../devkit/documents/Workspace#cachedirectory): string
- [cli](../../devkit/documents/Workspace#cli): Object
- [defaultBase](../../devkit/documents/Workspace#defaultbase): string
- [defaultProject](../../devkit/documents/Workspace#defaultproject): string
- [extends](../../devkit/documents/Workspace#extends): string
- [generators](../../devkit/documents/Workspace#generators): Object
- [implicitDependencies](../../devkit/documents/Workspace#implicitdependencies): ImplicitDependencyEntry<string[] | "\*">
- [installation](../../devkit/documents/Workspace#installation): NxInstallationConfiguration
- [namedInputs](../../devkit/documents/Workspace#namedinputs): Object
- [nxCloudAccessToken](../../devkit/documents/Workspace#nxcloudaccesstoken): string
- [nxCloudEncryptionKey](../../devkit/documents/Workspace#nxcloudencryptionkey): string
- [nxCloudUrl](../../devkit/documents/Workspace#nxcloudurl): string
- [parallel](../../devkit/documents/Workspace#parallel): number
- [plugins](../../devkit/documents/Workspace#plugins): PluginConfiguration[]
- [pluginsConfig](../../devkit/documents/Workspace#pluginsconfig): Record<string, Record<string, unknown>>
- [projects](../../devkit/documents/Workspace#projects): Record<string, ProjectConfiguration>
- [release](../../devkit/documents/Workspace#release): NxReleaseConfiguration
- [targetDefaults](../../devkit/documents/Workspace#targetdefaults): TargetDefaults
- [tasksRunnerOptions](../../devkit/documents/Workspace#tasksrunneroptions): Object
- [useDaemonProcess](../../devkit/documents/Workspace#usedaemonprocess): boolean
- [useInferencePlugins](../../devkit/documents/Workspace#useinferenceplugins): boolean
- [version](../../devkit/documents/Workspace#version): number
- [workspaceLayout](../../devkit/documents/Workspace#workspacelayout): Object
## Properties
+11 -11
View File
@@ -15,20 +15,20 @@ const code = `bootstrap({
const indexOfPropertyName = 13; // Usually determined by analyzing an AST.
const updatedCode = applyChangesToString(code, [
{
type: ChangeType.Insert,
index: indexOfPropertyName,
text: 'element',
},
{
type: ChangeType.Delete,
start: indexOfPropertyName,
length: 6,
},
{
type: ChangeType.Insert,
index: indexOfPropertyName,
text: 'element',
},
{
type: ChangeType.Delete,
start: indexOfPropertyName,
length: 6,
},
]);
bootstrap({
element: document.querySelector('#app'),
element: document.querySelector('#app'),
});
```
@@ -8,16 +8,16 @@ Nx will compute the graph either in a daemon process or in the current process.
Nx will compute it in the current process if:
- The process is running in CI (CI env variable is to true or other common variables used by CI providers are set).
- It is running in the docker container.
- The daemon process is disabled because of the previous error when starting the daemon.
- `NX_DAEMON` is set to `false`.
- `useDaemonProcess` is set to false in the options of the tasks runner inside `nx.json`
- The process is running in CI (CI env variable is to true or other common variables used by CI providers are set).
- It is running in the docker container.
- The daemon process is disabled because of the previous error when starting the daemon.
- `NX_DAEMON` is set to `false`.
- `useDaemonProcess` is set to false in the options of the tasks runner inside `nx.json`
`NX_DAEMON` env variable takes precedence:
- If it is set to true, the daemon will always be used.
- If it is set to false, the graph will always be computed in the current process.
- If it is set to true, the daemon will always be used.
- If it is set to false, the graph will always be computed in the current process.
Tip: If you want to debug project graph creation, run your command with NX_DAEMON=false.
+4 -4
View File
@@ -6,15 +6,15 @@ Generates a folder of files based on provided templates.
While doing so it performs two substitutions:
- Substitutes segments of file names surrounded by \_\_
- Uses ejs to substitute values in templates
- Substitutes segments of file names surrounded by \_\_
- Uses ejs to substitute values in templates
Examples:
```typescript
generateFiles(tree, path.join(__dirname, 'files'), './tools/scripts', {
tmpl: '',
name: 'myscript',
tmpl: '',
name: 'myscript',
});
```
@@ -2,43 +2,43 @@
## Hierarchy
- `ScopedHost`\<`any`\>
- `ScopedHost`\<`any`\>
**`NxScopedHost`**
**`NxScopedHost`**
## Table of contents
### Constructors
- [constructor](../../devkit/documents/ngcli_adapter/NxScopedHost#constructor)
- [constructor](../../devkit/documents/ngcli_adapter/NxScopedHost#constructor)
### Properties
- [\_delegate](../../devkit/documents/ngcli_adapter/NxScopedHost#_delegate): Host<any>
- [\_root](../../devkit/documents/ngcli_adapter/NxScopedHost#_root): Path
- [root](../../devkit/documents/ngcli_adapter/NxScopedHost#root): string
- [\_delegate](../../devkit/documents/ngcli_adapter/NxScopedHost#_delegate): Host<any>
- [\_root](../../devkit/documents/ngcli_adapter/NxScopedHost#_root): Path
- [root](../../devkit/documents/ngcli_adapter/NxScopedHost#root): string
### Accessors
- [capabilities](../../devkit/documents/ngcli_adapter/NxScopedHost#capabilities)
- [capabilities](../../devkit/documents/ngcli_adapter/NxScopedHost#capabilities)
### Methods
- [\_resolve](../../devkit/documents/ngcli_adapter/NxScopedHost#_resolve)
- [delete](../../devkit/documents/ngcli_adapter/NxScopedHost#delete)
- [exists](../../devkit/documents/ngcli_adapter/NxScopedHost#exists)
- [isDirectory](../../devkit/documents/ngcli_adapter/NxScopedHost#isdirectory)
- [isFile](../../devkit/documents/ngcli_adapter/NxScopedHost#isfile)
- [list](../../devkit/documents/ngcli_adapter/NxScopedHost#list)
- [mergeProjectConfiguration](../../devkit/documents/ngcli_adapter/NxScopedHost#mergeprojectconfiguration)
- [read](../../devkit/documents/ngcli_adapter/NxScopedHost#read)
- [readExistingAngularJson](../../devkit/documents/ngcli_adapter/NxScopedHost#readexistingangularjson)
- [readJson](../../devkit/documents/ngcli_adapter/NxScopedHost#readjson)
- [readMergedWorkspaceConfiguration](../../devkit/documents/ngcli_adapter/NxScopedHost#readmergedworkspaceconfiguration)
- [rename](../../devkit/documents/ngcli_adapter/NxScopedHost#rename)
- [stat](../../devkit/documents/ngcli_adapter/NxScopedHost#stat)
- [watch](../../devkit/documents/ngcli_adapter/NxScopedHost#watch)
- [write](../../devkit/documents/ngcli_adapter/NxScopedHost#write)
- [\_resolve](../../devkit/documents/ngcli_adapter/NxScopedHost#_resolve)
- [delete](../../devkit/documents/ngcli_adapter/NxScopedHost#delete)
- [exists](../../devkit/documents/ngcli_adapter/NxScopedHost#exists)
- [isDirectory](../../devkit/documents/ngcli_adapter/NxScopedHost#isdirectory)
- [isFile](../../devkit/documents/ngcli_adapter/NxScopedHost#isfile)
- [list](../../devkit/documents/ngcli_adapter/NxScopedHost#list)
- [mergeProjectConfiguration](../../devkit/documents/ngcli_adapter/NxScopedHost#mergeprojectconfiguration)
- [read](../../devkit/documents/ngcli_adapter/NxScopedHost#read)
- [readExistingAngularJson](../../devkit/documents/ngcli_adapter/NxScopedHost#readexistingangularjson)
- [readJson](../../devkit/documents/ngcli_adapter/NxScopedHost#readjson)
- [readMergedWorkspaceConfiguration](../../devkit/documents/ngcli_adapter/NxScopedHost#readmergedworkspaceconfiguration)
- [rename](../../devkit/documents/ngcli_adapter/NxScopedHost#rename)
- [stat](../../devkit/documents/ngcli_adapter/NxScopedHost#stat)
- [watch](../../devkit/documents/ngcli_adapter/NxScopedHost#watch)
- [write](../../devkit/documents/ngcli_adapter/NxScopedHost#write)
## Constructors
@@ -4,9 +4,9 @@
### Classes
- [NxScopedHost](../../devkit/documents/ngcli_adapter/NxScopedHost)
- [NxScopedHost](../../devkit/documents/ngcli_adapter/NxScopedHost)
### Functions
- [mockSchematicsForTesting](../../devkit/documents/ngcli_adapter/mockSchematicsForTesting)
- [wrapAngularDevkitSchematic](../../devkit/documents/ngcli_adapter/wrapAngularDevkitSchematic)
- [mockSchematicsForTesting](../../devkit/documents/ngcli_adapter/mockSchematicsForTesting)
- [wrapAngularDevkitSchematic](../../devkit/documents/ngcli_adapter/wrapAngularDevkitSchematic)
@@ -14,9 +14,9 @@ Example:
```typescript
mockSchematicsForTesting({
'mycollection:myschematic': (tree, params) => {
tree.write('README');
},
'mycollection:myschematic': (tree, params) => {
tree.write('README');
},
});
```
+10 -10
View File
@@ -9,22 +9,22 @@ that the params aren't parsed from the string, but instead provided parsed alrea
Apart from that, it works the same way:
- it will load the workspace configuration
- it will resolve the target
- it will load the executor and the schema
- it will load the options for the appropriate configuration
- it will run the validations and will set the default
- and, of course, it will invoke the executor
- it will load the workspace configuration
- it will resolve the target
- it will load the executor and the schema
- it will load the options for the appropriate configuration
- it will run the validations and will set the default
- and, of course, it will invoke the executor
Example:
```typescript
for await (const s of await runExecutor(
{ project: 'myproj', target: 'serve' },
{ watch: true },
context
{ project: 'myproj', target: 'serve' },
{ watch: true },
context
)) {
// s.success
// s.success
}
```
File diff suppressed because it is too large Load Diff
+348 -344
View File
@@ -1,346 +1,350 @@
{
"/extending-nx/intro": {
"id": "intro",
"name": "Intro",
"description": "Learn about plugins.",
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "getting-started",
"name": "Getting Started with Plugins",
"description": "Learn how to extend Nx by creating and releasing your own Nx plugin.",
"mediaImage": "",
"file": "shared/plugins/intro",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/intro/getting-started",
"tags": []
}
],
"isExternal": false,
"path": "/extending-nx/intro",
"tags": []
},
"/extending-nx/intro/getting-started": {
"id": "getting-started",
"name": "Getting Started with Plugins",
"description": "Learn how to extend Nx by creating and releasing your own Nx plugin.",
"mediaImage": "",
"file": "shared/plugins/intro",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/intro/getting-started",
"tags": []
},
"/extending-nx/tutorials": {
"id": "tutorials",
"name": "5 Min Tutorials",
"description": "Get started with plugins",
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "create-plugin",
"name": "Create a Local Plugin",
"description": "",
"mediaImage": "",
"file": "shared/plugins/create-plugin",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/tutorials/create-plugin",
"tags": []
},
{
"id": "publish-plugin",
"name": "Maintain a Published Plugin",
"description": "",
"mediaImage": "",
"file": "shared/plugins/maintain-published-plugin",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/tutorials/publish-plugin",
"tags": []
}
],
"isExternal": false,
"path": "/extending-nx/tutorials",
"tags": []
},
"/extending-nx/tutorials/create-plugin": {
"id": "create-plugin",
"name": "Create a Local Plugin",
"description": "",
"mediaImage": "",
"file": "shared/plugins/create-plugin",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/tutorials/create-plugin",
"tags": []
},
"/extending-nx/tutorials/publish-plugin": {
"id": "publish-plugin",
"name": "Maintain a Published Plugin",
"description": "",
"mediaImage": "",
"file": "shared/plugins/maintain-published-plugin",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/tutorials/publish-plugin",
"tags": []
},
"/extending-nx/recipes": {
"id": "recipes",
"name": "Recipes",
"description": "Focused instructions to complete a specific task",
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "local-executors",
"name": "Write a Simple Executor",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/local-executors",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/local-executors",
"tags": []
},
{
"id": "compose-executors",
"name": "Compose Executors",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/compose-executors",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/compose-executors",
"tags": []
},
{
"id": "local-generators",
"name": "Write a Simple Generator",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/local-generators",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/local-generators",
"tags": ["generate-code"]
},
{
"id": "composing-generators",
"name": "Compose Generators",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/composing-generators",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/composing-generators",
"tags": ["generate-code"]
},
{
"id": "generator-options",
"name": "Provide Options for Generators",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/generator-options",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/generator-options",
"tags": ["generate-code"]
},
{
"id": "creating-files",
"name": "Create Files",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/creating-files",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/creating-files",
"tags": ["generate-code"]
},
{
"id": "modifying-files",
"name": "Modify Files",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/modifying-files",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/modifying-files",
"tags": ["generate-code"]
},
{
"id": "migration-generators",
"name": "Write a Migration",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/migration-generators",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/migration-generators",
"tags": ["create-your-own-plugin"]
},
{
"id": "create-preset",
"name": "Create a Preset",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/create-preset",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/create-preset",
"tags": ["create-your-own-plugin"]
},
{
"id": "create-install-package",
"name": "Create an Install Package",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/create-install-package",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/create-install-package",
"tags": ["create-your-own-plugin"]
},
{
"id": "project-graph-plugins",
"name": "Modify the Project Graph",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/project-graph-plugins",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/project-graph-plugins",
"tags": ["create-your-own-plugin", "explore-graph", "inferred-tasks"]
}
],
"isExternal": false,
"path": "/extending-nx/recipes",
"tags": []
},
"/extending-nx/recipes/local-executors": {
"id": "local-executors",
"name": "Write a Simple Executor",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/local-executors",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/local-executors",
"tags": []
},
"/extending-nx/recipes/compose-executors": {
"id": "compose-executors",
"name": "Compose Executors",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/compose-executors",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/compose-executors",
"tags": []
},
"/extending-nx/recipes/local-generators": {
"id": "local-generators",
"name": "Write a Simple Generator",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/local-generators",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/local-generators",
"tags": ["generate-code"]
},
"/extending-nx/recipes/composing-generators": {
"id": "composing-generators",
"name": "Compose Generators",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/composing-generators",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/composing-generators",
"tags": ["generate-code"]
},
"/extending-nx/recipes/generator-options": {
"id": "generator-options",
"name": "Provide Options for Generators",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/generator-options",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/generator-options",
"tags": ["generate-code"]
},
"/extending-nx/recipes/creating-files": {
"id": "creating-files",
"name": "Create Files",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/creating-files",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/creating-files",
"tags": ["generate-code"]
},
"/extending-nx/recipes/modifying-files": {
"id": "modifying-files",
"name": "Modify Files",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/modifying-files",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/modifying-files",
"tags": ["generate-code"]
},
"/extending-nx/recipes/migration-generators": {
"id": "migration-generators",
"name": "Write a Migration",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/migration-generators",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/migration-generators",
"tags": ["create-your-own-plugin"]
},
"/extending-nx/recipes/create-preset": {
"id": "create-preset",
"name": "Create a Preset",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/create-preset",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/create-preset",
"tags": ["create-your-own-plugin"]
},
"/extending-nx/recipes/create-install-package": {
"id": "create-install-package",
"name": "Create an Install Package",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/create-install-package",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/create-install-package",
"tags": ["create-your-own-plugin"]
},
"/extending-nx/recipes/project-graph-plugins": {
"id": "project-graph-plugins",
"name": "Modify the Project Graph",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/project-graph-plugins",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/project-graph-plugins",
"tags": ["create-your-own-plugin", "explore-graph", "inferred-tasks"]
}
"/extending-nx/intro": {
"id": "intro",
"name": "Intro",
"description": "Learn about plugins.",
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "getting-started",
"name": "Getting Started with Plugins",
"description": "Learn how to extend Nx by creating and releasing your own Nx plugin.",
"mediaImage": "",
"file": "shared/plugins/intro",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/intro/getting-started",
"tags": []
}
],
"isExternal": false,
"path": "/extending-nx/intro",
"tags": []
},
"/extending-nx/intro/getting-started": {
"id": "getting-started",
"name": "Getting Started with Plugins",
"description": "Learn how to extend Nx by creating and releasing your own Nx plugin.",
"mediaImage": "",
"file": "shared/plugins/intro",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/intro/getting-started",
"tags": []
},
"/extending-nx/tutorials": {
"id": "tutorials",
"name": "5 Min Tutorials",
"description": "Get started with plugins",
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "create-plugin",
"name": "Create a Local Plugin",
"description": "",
"mediaImage": "",
"file": "shared/plugins/create-plugin",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/tutorials/create-plugin",
"tags": []
},
{
"id": "publish-plugin",
"name": "Maintain a Published Plugin",
"description": "",
"mediaImage": "",
"file": "shared/plugins/maintain-published-plugin",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/tutorials/publish-plugin",
"tags": []
}
],
"isExternal": false,
"path": "/extending-nx/tutorials",
"tags": []
},
"/extending-nx/tutorials/create-plugin": {
"id": "create-plugin",
"name": "Create a Local Plugin",
"description": "",
"mediaImage": "",
"file": "shared/plugins/create-plugin",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/tutorials/create-plugin",
"tags": []
},
"/extending-nx/tutorials/publish-plugin": {
"id": "publish-plugin",
"name": "Maintain a Published Plugin",
"description": "",
"mediaImage": "",
"file": "shared/plugins/maintain-published-plugin",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/tutorials/publish-plugin",
"tags": []
},
"/extending-nx/recipes": {
"id": "recipes",
"name": "Recipes",
"description": "Focused instructions to complete a specific task",
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "local-executors",
"name": "Write a Simple Executor",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/local-executors",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/local-executors",
"tags": []
},
{
"id": "compose-executors",
"name": "Compose Executors",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/compose-executors",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/compose-executors",
"tags": []
},
{
"id": "local-generators",
"name": "Write a Simple Generator",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/local-generators",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/local-generators",
"tags": ["generate-code"]
},
{
"id": "composing-generators",
"name": "Compose Generators",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/composing-generators",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/composing-generators",
"tags": ["generate-code"]
},
{
"id": "generator-options",
"name": "Provide Options for Generators",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/generator-options",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/generator-options",
"tags": ["generate-code"]
},
{
"id": "creating-files",
"name": "Create Files",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/creating-files",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/creating-files",
"tags": ["generate-code"]
},
{
"id": "modifying-files",
"name": "Modify Files",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/modifying-files",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/modifying-files",
"tags": ["generate-code"]
},
{
"id": "migration-generators",
"name": "Write a Migration",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/migration-generators",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/migration-generators",
"tags": ["create-your-own-plugin"]
},
{
"id": "create-preset",
"name": "Create a Preset",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/create-preset",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/create-preset",
"tags": ["create-your-own-plugin"]
},
{
"id": "create-install-package",
"name": "Create an Install Package",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/create-install-package",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/create-install-package",
"tags": ["create-your-own-plugin"]
},
{
"id": "project-graph-plugins",
"name": "Modify the Project Graph",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/project-graph-plugins",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/project-graph-plugins",
"tags": [
"create-your-own-plugin",
"explore-graph",
"inferred-tasks"
]
}
],
"isExternal": false,
"path": "/extending-nx/recipes",
"tags": []
},
"/extending-nx/recipes/local-executors": {
"id": "local-executors",
"name": "Write a Simple Executor",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/local-executors",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/local-executors",
"tags": []
},
"/extending-nx/recipes/compose-executors": {
"id": "compose-executors",
"name": "Compose Executors",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/compose-executors",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/compose-executors",
"tags": []
},
"/extending-nx/recipes/local-generators": {
"id": "local-generators",
"name": "Write a Simple Generator",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/local-generators",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/local-generators",
"tags": ["generate-code"]
},
"/extending-nx/recipes/composing-generators": {
"id": "composing-generators",
"name": "Compose Generators",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/composing-generators",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/composing-generators",
"tags": ["generate-code"]
},
"/extending-nx/recipes/generator-options": {
"id": "generator-options",
"name": "Provide Options for Generators",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/generator-options",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/generator-options",
"tags": ["generate-code"]
},
"/extending-nx/recipes/creating-files": {
"id": "creating-files",
"name": "Create Files",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/creating-files",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/creating-files",
"tags": ["generate-code"]
},
"/extending-nx/recipes/modifying-files": {
"id": "modifying-files",
"name": "Modify Files",
"description": "",
"mediaImage": "",
"file": "shared/recipes/generators/modifying-files",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/modifying-files",
"tags": ["generate-code"]
},
"/extending-nx/recipes/migration-generators": {
"id": "migration-generators",
"name": "Write a Migration",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/migration-generators",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/migration-generators",
"tags": ["create-your-own-plugin"]
},
"/extending-nx/recipes/create-preset": {
"id": "create-preset",
"name": "Create a Preset",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/create-preset",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/create-preset",
"tags": ["create-your-own-plugin"]
},
"/extending-nx/recipes/create-install-package": {
"id": "create-install-package",
"name": "Create an Install Package",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/create-install-package",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/create-install-package",
"tags": ["create-your-own-plugin"]
},
"/extending-nx/recipes/project-graph-plugins": {
"id": "project-graph-plugins",
"name": "Modify the Project Graph",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/project-graph-plugins",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/project-graph-plugins",
"tags": ["create-your-own-plugin", "explore-graph", "inferred-tasks"]
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -11,11 +11,11 @@ Nx evolved from being an extension of the Angular CLI to a [fully standalone CLI
Nx...
- helps define clear architectural guidelines and promotes best practices to organize and scale your codebase.
- helps integrate modern tooling by actively working with devtool authors to make sure they work well with Nx and your framework of choice.
- is adaptable: start small with a single-project setup and grow it to a monorepo when needed.
- has an active community of contributors and plugin authors.
- has been proven in large enterprise-level projects.
- helps define clear architectural guidelines and promotes best practices to organize and scale your codebase.
- helps integrate modern tooling by actively working with devtool authors to make sure they work well with Nx and your framework of choice.
- is adaptable: start small with a single-project setup and grow it to a monorepo when needed.
- has an active community of contributors and plugin authors.
- has been proven in large enterprise-level projects.
Note, the Nx team's focus is on building the best possible developer productivity tool.
@@ -64,8 +64,8 @@ Learn about the similarities between the Angular CLI and Nx which makes it easy
Nx is not just exclusively for monorepos, but can create
- a single-project workspace (basically what the Angular CLI gives you)
- a monorepo workspace (multiple projects in a single repo)
- a single-project workspace (basically what the Angular CLI gives you)
- a monorepo workspace (multiple projects in a single repo)
You can check out the [Angular single-project workspace tutorial](/getting-started/tutorials/angular-standalone-tutorial) to learn more about it.
@@ -164,10 +164,10 @@ Nx has more abilities to run commands in parallel, just for specific projects et
An Angular-based Nx Workspace already comes with a lot of batteries included:
- Prettier preconfigured
- ESLint
- e2e testing with [Cypress](https://www.cypress.io/) or [Playwright](https://playwright.dev/)
- unit testing with [Jest](https://jestjs.io/)
- Prettier preconfigured
- ESLint
- e2e testing with [Cypress](https://www.cypress.io/) or [Playwright](https://playwright.dev/)
- unit testing with [Jest](https://jestjs.io/)
But Nx expands beyond just that, offering automated integration with a lot of modern tools such as [Storybook](https://storybook.js.org/) or [Tailwind](https://tailwindcss.com/) just to mention a few.
@@ -183,13 +183,13 @@ What's the difference?
`nx migrate` is a much-improved version of `ng update`. It runs the same migrations but allows you to:
- Rerun the same migration multiple times.
- Reorder migrations.
- Skip migrations.
- Fix migrations that "almost work".
- Commit a partially migrated state.
- Change versions of packages to match org requirements.
- [Opt out of Angular updates when updating Nx versions](/recipes/tips-n-tricks/advanced-update#choosing-optional-package-updates-to-apply) as long as [the Angular version is still supported](/nx-api/angular/documents/angular-nx-version-matrix)
- Rerun the same migration multiple times.
- Reorder migrations.
- Skip migrations.
- Fix migrations that "almost work".
- Commit a partially migrated state.
- Change versions of packages to match org requirements.
- [Opt out of Angular updates when updating Nx versions](/recipes/tips-n-tricks/advanced-update#choosing-optional-package-updates-to-apply) as long as [the Angular version is still supported](/nx-api/angular/documents/angular-nx-version-matrix)
`nx migrate` does this by splitting the process into two steps. `nx migrate latest` creates a `migrations.json` file with a list of all the migrations needed by Nx, Angular, and other packages. You can then modify that file before running `nx migrate --run-migrations` to execute those migrations.
@@ -242,11 +242,11 @@ Nx is designed to be fast. The Angular CLI leverages Webpack's caching, which Nx
Features like
- only running tasks on [affected projects](/ci/features/affected)
- running [tasks in parallel](/features/run-tasks#run-tasks-for-multiple-projects)
- applying [computation caching](/features/cache-task-results)
- offering [remote caching abilities](/ci/features/remote-cache) on CI
- offering [task distribution across machines (Nx Agents)](/ci/features/distribute-task-execution)
- only running tasks on [affected projects](/ci/features/affected)
- running [tasks in parallel](/features/run-tasks#run-tasks-for-multiple-projects)
- applying [computation caching](/features/cache-task-results)
- offering [remote caching abilities](/ci/features/remote-cache) on CI
- offering [task distribution across machines (Nx Agents)](/ci/features/distribute-task-execution)
And, Nx already uses fast, modern tooling like [ESBuild](/nx-api/esbuild), [Vite](/nx-api/vite), Vitest and [Rspack](/nx-api/rspack) for non-Angular stacks. So once Angular is ready to use these tools, Nx will also be ready.
@@ -260,10 +260,10 @@ Nx goes beyond being just a CLI and comes with [Nx Console](/getting-started/edi
Nx is really made to scale with you. You can
- start small with a single-project workspace
- modularize your application into more fine-grained libraries for better maintainability as your application (and team) grows ([more about that here](/getting-started/tutorials/angular-standalone-tutorial#modularizing-your-angular-app-with-local-libraries)), including mechanisms to make sure [things stay within their boundaries](/features/enforce-module-boundaries)
- you can then migrate to a monorepo when you are ready and need one ([more here](/recipes/tips-n-tricks/standalone-to-integrated))
- or even [add Webpack Module Federation support](/recipes/angular/module-federation-with-ssr)
- start small with a single-project workspace
- modularize your application into more fine-grained libraries for better maintainability as your application (and team) grows ([more about that here](/getting-started/tutorials/angular-standalone-tutorial#modularizing-your-angular-app-with-local-libraries)), including mechanisms to make sure [things stay within their boundaries](/features/enforce-module-boundaries)
- you can then migrate to a monorepo when you are ready and need one ([more here](/recipes/tips-n-tricks/standalone-to-integrated))
- or even [add Webpack Module Federation support](/recipes/angular/module-federation-with-ssr)
### Visualize your Workspace
@@ -273,105 +273,105 @@ As you start modularizing your Angular workspace, Nx can visualize it using the
```json
{
"hash": "58420bb4002bb9b6914bdeb7808c77a591a089fc82aaee11e656d73b2735e3fa",
"projects": [
{
"name": "shared-product-state",
"type": "lib",
"data": {
"tags": ["scope:shared", "type:state"]
}
},
{
"name": "shared-product-types",
"type": "lib",
"data": {
"tags": ["type:types", "scope:shared"]
}
},
{
"name": "shared-product-data",
"type": "lib",
"data": {
"tags": ["type:data", "scope:shared"]
}
},
{
"name": "cart-cart-page",
"type": "lib",
"data": {
"tags": ["scope:cart", "type:feature"]
}
},
{
"name": "shared-styles",
"type": "lib",
"data": {
"tags": ["scope:shared", "type:styles"]
}
},
{
"name": "cart-e2e",
"type": "e2e",
"data": {
"tags": ["scope:cart", "type:e2e"]
}
},
{
"name": "cart",
"type": "app",
"data": {
"tags": ["type:app", "scope:cart"]
}
}
],
"dependencies": {
"shared-product-state": [
"hash": "58420bb4002bb9b6914bdeb7808c77a591a089fc82aaee11e656d73b2735e3fa",
"projects": [
{
"source": "shared-product-state",
"target": "shared-product-data",
"type": "static"
"name": "shared-product-state",
"type": "lib",
"data": {
"tags": ["scope:shared", "type:state"]
}
},
{
"source": "shared-product-state",
"target": "shared-product-types",
"type": "static"
}
],
"shared-product-types": [],
"shared-product-data": [
"name": "shared-product-types",
"type": "lib",
"data": {
"tags": ["type:types", "scope:shared"]
}
},
{
"source": "shared-product-data",
"target": "shared-product-types",
"type": "static"
}
],
"shared-e2e-utils": [],
"cart-cart-page": [
"name": "shared-product-data",
"type": "lib",
"data": {
"tags": ["type:data", "scope:shared"]
}
},
{
"source": "cart-cart-page",
"target": "shared-product-state",
"type": "static"
"name": "cart-cart-page",
"type": "lib",
"data": {
"tags": ["scope:cart", "type:feature"]
}
},
{
"name": "shared-styles",
"type": "lib",
"data": {
"tags": ["scope:shared", "type:styles"]
}
},
{
"name": "cart-e2e",
"type": "e2e",
"data": {
"tags": ["scope:cart", "type:e2e"]
}
},
{
"name": "cart",
"type": "app",
"data": {
"tags": ["type:app", "scope:cart"]
}
}
],
"shared-styles": [],
"cart-e2e": [
{ "source": "cart-e2e", "target": "cart", "type": "implicit" }
],
"cart": [
{ "source": "cart", "target": "shared-styles", "type": "implicit" },
{ "source": "cart", "target": "cart-cart-page", "type": "static" }
]
},
"workspaceLayout": {
"appsDir": "apps",
"libsDir": "libs"
},
"affectedProjectIds": [],
"focus": null,
"groupByFolder": false,
"exclude": [],
"enableTooltips": true
],
"dependencies": {
"shared-product-state": [
{
"source": "shared-product-state",
"target": "shared-product-data",
"type": "static"
},
{
"source": "shared-product-state",
"target": "shared-product-types",
"type": "static"
}
],
"shared-product-types": [],
"shared-product-data": [
{
"source": "shared-product-data",
"target": "shared-product-types",
"type": "static"
}
],
"shared-e2e-utils": [],
"cart-cart-page": [
{
"source": "cart-cart-page",
"target": "shared-product-state",
"type": "static"
}
],
"shared-styles": [],
"cart-e2e": [
{ "source": "cart-e2e", "target": "cart", "type": "implicit" }
],
"cart": [
{ "source": "cart", "target": "shared-styles", "type": "implicit" },
{ "source": "cart", "target": "cart-cart-page", "type": "static" }
]
},
"workspaceLayout": {
"appsDir": "apps",
"libsDir": "libs"
},
"affectedProjectIds": [],
"focus": null,
"groupByFolder": false,
"exclude": [],
"enableTooltips": true
}
```
@@ -399,5 +399,5 @@ There is also a guide describing how to [consolidate multiple Angular CLI projec
You can learn more about Angular & Nx by following our dedicated tutorials:
- [Tutorial: Building Angular Apps with the Nx Standalone Projects Setup](/getting-started/tutorials/angular-standalone-tutorial)
- [Tutorial: Building Angular Apps in an Nx Monorepo](/getting-started/tutorials/angular-monorepo-tutorial)
- [Tutorial: Building Angular Apps with the Nx Standalone Projects Setup](/getting-started/tutorials/angular-standalone-tutorial)
- [Tutorial: Building Angular Apps in an Nx Monorepo](/getting-started/tutorials/angular-monorepo-tutorial)
@@ -21,20 +21,20 @@ import { Tree, formatFiles, generateFiles } from '@nx/devkit';
import * as path from 'path';
interface Schema {
name: string;
skipFormat: boolean;
name: string;
skipFormat: boolean;
}
export default async function (tree: Tree, options: Schema) {
generateFiles(
tree,
path.join(__dirname, 'files'),
path.join('tools/generators', schema.name),
options
);
if (!schema.skipFormat) {
await formatFiles(tree);
}
generateFiles(
tree,
path.join(__dirname, 'files'),
path.join('tools/generators', schema.name),
options
);
if (!schema.skipFormat) {
await formatFiles(tree);
}
}
```
@@ -42,47 +42,47 @@ The following is an analogous generator written as an Angular Schematic.
```typescript
import {
apply,
branchAndMerge,
chain,
mergeWith,
Rule,
template,
url,
move,
apply,
branchAndMerge,
chain,
mergeWith,
Rule,
template,
url,
move,
} from '@angular-devkit/schematics';
import { formatFiles } from '@nx/workspace';
import { toFileName } from '@nx/workspace';
interface Schema {
name: string;
skipFormat: boolean;
name: string;
skipFormat: boolean;
}
export default function (options: Schema): Rule {
const templateSource = apply(url('./files'), [
template({
dot: '.',
tmpl: '',
...(options as any),
}),
move('tools/generators'),
]);
return chain([
branchAndMerge(chain([mergeWith(templateSource)])),
formatFiles(options),
]);
const templateSource = apply(url('./files'), [
template({
dot: '.',
tmpl: '',
...(options as any),
}),
move('tools/generators'),
]);
return chain([
branchAndMerge(chain([mergeWith(templateSource)])),
formatFiles(options),
]);
}
```
### Notable Differences
- Nx Devkit generators do not use partial application. An Angular Schematic returns a rule that is then invoked with a tree.
- Nx Devkit generators do not use RxJS observables. Instead, you invoke the helpers directly, which makes them more debuggable. As you step through the generator you can see the tree being updated.
- There are more affordances for commonly used operations. For instance, `chain([mergeWith(apply(url` is replaced with `generateFiles`)
- Nx Devkit generators return a function that performs side effects. Angular Schematics have to create a custom task runner and register a task using it.
- Nx Devkit generators are composed as any other JS function. You do need to go through a special resolution step (`externalSchematic`) that is required when using Angular Schematics.
- No special utilities are needed to test Nx Devkit generators. Special utilities are needed to test Angular Schematics.
- Nx Devkit generators do not use partial application. An Angular Schematic returns a rule that is then invoked with a tree.
- Nx Devkit generators do not use RxJS observables. Instead, you invoke the helpers directly, which makes them more debuggable. As you step through the generator you can see the tree being updated.
- There are more affordances for commonly used operations. For instance, `chain([mergeWith(apply(url` is replaced with `generateFiles`)
- Nx Devkit generators return a function that performs side effects. Angular Schematics have to create a custom task runner and register a task using it.
- Nx Devkit generators are composed as any other JS function. You do need to go through a special resolution step (`externalSchematic`) that is required when using Angular Schematics.
- No special utilities are needed to test Nx Devkit generators. Special utilities are needed to test Angular Schematics.
### Conversions
@@ -103,7 +103,7 @@ First, you need to
```typescript
export async function mygenerator(tree: Tree, options: Schema) {
// ...
// ...
}
export const mygeneratorSchematic = convertNxGenerator(mygenerator);
```
@@ -112,21 +112,21 @@ Then, you might need to register it in the `collections.json`:
```json
{
"name": "Nx React",
"version": "0.1",
"extends": ["@nx/workspace"],
"schematics": {
"mygenerator": {
"factory": "./src/generators/mygenerator/mygenerator#mygeneratorSchematic",
"schema": "./src/generators/mygenerator/schema.json"
}
},
"generators": {
"init": {
"factory": "./src/generators/mygenerator/mygenerator#mygenerator",
"schema": "./src/generators/mygenerator/schema.json"
}
}
"name": "Nx React",
"version": "0.1",
"extends": ["@nx/workspace"],
"schematics": {
"mygenerator": {
"factory": "./src/generators/mygenerator/mygenerator#mygeneratorSchematic",
"schema": "./src/generators/mygenerator/schema.json"
}
},
"generators": {
"init": {
"factory": "./src/generators/mygenerator/mygenerator#mygenerator",
"schema": "./src/generators/mygenerator/schema.json"
}
}
}
```
@@ -134,12 +134,12 @@ Then, you might need to register it in the `collections.json`:
```typescript
export const libraryGenerator = wrapAngularDevkitSchematic(
'@schematics/angular',
'library'
'@schematics/angular',
'library'
);
export async function mygenerator(tree: Tree, options: Schema) {
await libraryGenerator(tree, options);
await libraryGenerator(tree, options);
}
```
@@ -149,20 +149,20 @@ The following is an executor written using Nx Devkit:
```typescript
interface Schema {
message: string;
allCaps: boolean;
message: string;
allCaps: boolean;
}
export default async function (
options: Schema,
context: ExecutorContext
options: Schema,
context: ExecutorContext
): Promise<{ success: true }> {
if (options.allCaps) {
console.log(options.message.toUpperCase());
} else {
console.log(options.message);
}
return { success: true };
if (options.allCaps) {
console.log(options.message.toUpperCase());
} else {
console.log(options.message);
}
return { success: true };
}
```
@@ -170,27 +170,27 @@ The following is an analogous executor written as an Angular builder:
```typescript
interface Schema {
message: string;
allCaps: boolean;
message: string;
allCaps: boolean;
}
export function run(
options: Schema,
context: BuilderContext
options: Schema,
context: BuilderContext
): Observable<{ success: true }> {
if (options.allCaps) {
console.log(options.message.toUpperCase());
} else {
console.log(options.message);
}
return of({ success: true });
if (options.allCaps) {
console.log(options.message.toUpperCase());
} else {
console.log(options.message);
}
return of({ success: true });
}
export default createBuilder<NextBuildBuilderOptions>(run);
```
### Notable Differences
- Nx Devkit executors return a Promise (or async iterable). If you want, you can always convert an observable to a promise or an async iterable.
- Nx Devkit executors do not have to be wrapped using `createBuilder`.
- Nx Devkit executors return a Promise (or async iterable). If you want, you can always convert an observable to a promise or an async iterable.
- Nx Devkit executors do not have to be wrapped using `createBuilder`.
The schema files for both Nx Devkit executors and Angular Builders are the same. Nx can run both of them in the same way.
@@ -8,20 +8,20 @@ within an Nx workspace. It also enables using Angular Devkit builders and schema
Among other things, it provides:
- Integration with libraries such as:
- Cypress
- ESLint
- Jest
- Playwright
- Storybook
- Generators to help scaffold code quickly, including:
- Micro Frontends
- Libraries, both internal to your codebase and publishable to npm
- Projects with Tailwind CSS
- Executors providing extra capabilities on top of the Angular Devkit builders:
- Provide ESBuild plugins
- Provide custom webpack configurations
- Utilities for automatic workspace refactoring
- Integration with libraries such as:
- Cypress
- ESLint
- Jest
- Playwright
- Storybook
- Generators to help scaffold code quickly, including:
- Micro Frontends
- Libraries, both internal to your codebase and publishable to npm
- Projects with Tailwind CSS
- Executors providing extra capabilities on top of the Angular Devkit builders:
- Provide ESBuild plugins
- Provide custom webpack configurations
- Utilities for automatic workspace refactoring
{% callout type="note" title="Currently using the Angular CLI?" %}
You can easily and mostly **automatically migrate from an Angular CLI** project to Nx! Learn
@@ -75,9 +75,9 @@ nx g @nx/angular:app appName
By default, the application will be generated with:
- ESLint as the linter.
- Jest as the unit test runner.
- Cypress as the E2E test runner.
- ESLint as the linter.
- Jest as the unit test runner.
- Cypress as the E2E test runner.
We can then serve, build, test, lint, and run e2e tests on the application with the following commands:
@@ -99,8 +99,8 @@ nx g @nx/angular:lib libName
By default, the library will be generated with:
- ESLint as the linter.
- Jest as the unit test runner.
- ESLint as the linter.
- Jest as the unit test runner.
We can then test and lint the library with the following commands:
@@ -111,9 +111,9 @@ nx lint libName
Read more about:
- [Creating Libraries](/concepts/decisions/project-size)
- [Library Types](/concepts/decisions/project-dependency-rules)
- [Buildable and Publishable Libraries](/concepts/buildable-and-publishable-libraries)
- [Creating Libraries](/concepts/decisions/project-size)
- [Library Types](/concepts/decisions/project-dependency-rules)
- [Buildable and Publishable Libraries](/concepts/buildable-and-publishable-libraries)
### Fallback to `@schematics/angular`
@@ -127,8 +127,8 @@ nx g @nx/angular:service my-service
## More Documentation
- [Angular Standalone Tutorial](/getting-started/tutorials/angular-standalone-tutorial)
- [Angular Monorepo Tutorial](/getting-started/tutorials/angular-monorepo-tutorial)
- [Migrating from the Angular CLI](/recipes/angular/migration/angular)
- [Setup Module Federation with Angular and Nx](/concepts/module-federation/faster-builds-with-module-federation)
- [Using Tailwind CSS with Angular projects](/recipes/angular/using-tailwind-css-with-angular-projects)
- [Angular Standalone Tutorial](/getting-started/tutorials/angular-standalone-tutorial)
- [Angular Monorepo Tutorial](/getting-started/tutorials/angular-monorepo-tutorial)
- [Migrating from the Angular CLI](/recipes/angular/migration/angular)
- [Setup Module Federation with Angular and Nx](/concepts/module-federation/faster-builds-with-module-federation)
- [Using Tailwind CSS with Angular projects](/recipes/angular/using-tailwind-css-with-angular-projects)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More