Compare commits
303 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c6bf6414ce | |||
| 395c3562d0 | |||
| 5a2ea09d9b | |||
| 9c5873c9fa | |||
| 47d4eb8eb8 | |||
| ad9344152f | |||
| 491966b6e3 | |||
| cda123802f | |||
| 9690aea0a8 | |||
| 6a1164f7ae | |||
| 0ce7acdf77 | |||
| 137ba06499 | |||
| 5df932b108 | |||
| 62e75edd24 | |||
| 2145117b24 | |||
| a42cabccf9 | |||
| e57d42cf09 | |||
| bb76d01942 | |||
| 232a2d4861 | |||
| 543e9e30c5 | |||
| ed300d5f82 | |||
| c0d3aa5697 | |||
| 622e0e0ec8 | |||
| 35656432e6 | |||
| bdbc1113d5 | |||
| 23fab0553a | |||
| 14fab26056 | |||
| 914cb1d779 | |||
| 1a1cb4f2dc | |||
| c175fc3138 | |||
| 4fe0bd61cc | |||
| b3174587a9 | |||
| 7b6b40390e | |||
| 1861d6e45f | |||
| 6b43833d2c | |||
| 64492ece8c | |||
| e9d50af945 | |||
| 0c0e61e122 | |||
| 5634d556a5 | |||
| 24b1ab5463 | |||
| f1a90bfd1c | |||
| bf5111c342 | |||
| ccad52e93c | |||
| 50a145bb64 | |||
| 9fdf14b89c | |||
| d892a297db | |||
| 5e51cd6eb5 | |||
| 1dcb80d447 | |||
| b5305604cd | |||
| 5be931cd53 | |||
| ea5efb9e4c | |||
| 697754dfaa | |||
| e5fd0d5581 | |||
| f02d230626 | |||
| 510e03d714 | |||
| d5ceca9499 | |||
| 054a371aab | |||
| bda5165266 | |||
| 842cf7aa11 | |||
| 3ae657cad3 | |||
| ce2c6d60e7 | |||
| 8c723380a7 | |||
| d63d3573c4 | |||
| 90e4e7e7de | |||
| 27923fd2d8 | |||
| e78575badc | |||
| 3313c7619a | |||
| 430c4d3240 | |||
| a5d6a293aa | |||
| 48deaec60f | |||
| b8a6621e29 | |||
| cd6c8d373a | |||
| fd6bccddff | |||
| 67bd9d7b62 | |||
| 662e595eb7 | |||
| cf7d2ebb44 | |||
| 9610fdd90c | |||
| 05cbce0de8 | |||
| 7d07a70d1c | |||
| 6615d5beb8 | |||
| aa2df9f417 | |||
| 3359249977 | |||
| 8d5a16004d | |||
| 8adee8ec9e | |||
| 9c7ded0b1a | |||
| dcefa4a6ad | |||
| 30c3e9925a | |||
| 554bea7a4c | |||
| d02a8dbf06 | |||
| dcecb6f46a | |||
| ee93657c3b | |||
| 47b3d49bb0 | |||
| 989f7f8f92 | |||
| d1d06349e7 | |||
| 80c470ac7f | |||
| 63521d7e13 | |||
| fdd9c24a2a | |||
| 9732188eee | |||
| dbd61b5d9a | |||
| 6afe0a7c20 | |||
| 3eba026e39 | |||
| 4304a451cc | |||
| d65736e125 | |||
| cfeb697895 | |||
| 0fd8859c37 | |||
| 35e95f0c53 | |||
| e06b9e0954 | |||
| 90574e5a21 | |||
| bd71ce35a4 | |||
| 3c13d291df | |||
| 461ec19505 | |||
| 1e30d43f7a | |||
| 205b6fec10 | |||
| 48000a5044 | |||
| f4b7ec2c0d | |||
| eb392109f7 | |||
| 661efa913d | |||
| 4c2f98ebf9 | |||
| 9aad21dbfb | |||
| b25d5b0637 | |||
| 4a541418bb | |||
| e4d23383f5 | |||
| 36dae70fb0 | |||
| 2dc6656f4b | |||
| 423a68b70e | |||
| d02950bb1b | |||
| 1363baea28 | |||
| 01ef42bc44 | |||
| 736a3ac11e | |||
| b5b75332e4 | |||
| f113bea262 | |||
| aa557a029c | |||
| 2b67959972 | |||
| eef0bd563d | |||
| c599d2fca4 | |||
| 1dadb3d772 | |||
| 901b70a4fe | |||
| 7d1a44bc57 | |||
| bdcec6de55 | |||
| 810b584c33 | |||
| 54dcc0f8be | |||
| aab868aa0c | |||
| a80abbf2c9 | |||
| 2dda1914b5 | |||
| b2763e1cc9 | |||
| bc85c544eb | |||
| 2f59796ac0 | |||
| 0957a99215 | |||
| b6db266c9e | |||
| e6c67e41ec | |||
| e05ca1fd2f | |||
| 3105203248 | |||
| b08c7e02f5 | |||
| a8bc69b61e | |||
| 09b70521e7 | |||
| 42a06b67d2 | |||
| f8068b7cf6 | |||
| 7aee21afd1 | |||
| ee7880c32e | |||
| 14b3f42900 | |||
| 7567a65975 | |||
| cd3472da22 | |||
| 331707d6eb | |||
| 999c2b5eee | |||
| b5e6787a98 | |||
| cb89b9ae17 | |||
| 2fc3e2e485 | |||
| 21d3c5e63c | |||
| 9199444f48 | |||
| 2e6592c533 | |||
| 8407d7aedf | |||
| b311cbf8e3 | |||
| 1861c931d6 | |||
| 717a8dd027 | |||
| e12e9bb9dd | |||
| c2c06c12c3 | |||
| 0f1c9d9e98 | |||
| 49a95800bc | |||
| 2cf039783a | |||
| eecbde52a5 | |||
| 835972277c | |||
| c3d4bfe9f0 | |||
| b7fb3ea8ad | |||
| 4ef66f4afd | |||
| d942e7b5fb | |||
| c97a8ac63b | |||
| 0ab8cd4b4c | |||
| d1e295ec40 | |||
| f4f4eb66e2 | |||
| fef5b65b45 | |||
| c4e56858b0 | |||
| a988be0bae | |||
| fb0f1f0ec8 | |||
| 28df2057fd | |||
| b73f980756 | |||
| ca5e673a80 | |||
| 4d5509bd04 | |||
| 3e86e42537 | |||
| 4ffc68e18b | |||
| 8d118160e9 | |||
| d9a95b64de | |||
| 48d4927068 | |||
| 2c1d4bac96 | |||
| 2dc12acf0c | |||
| 29a9f8eba8 | |||
| 34cde20426 | |||
| 7280cb0f72 | |||
| ab11815041 | |||
| 3fcd84aed4 | |||
| b1a9ae7ce7 | |||
| e2f1c92e03 | |||
| d4f0e304b4 | |||
| 3a29699210 | |||
| d0eb029819 | |||
| 36cd6b0485 | |||
| 21bf6cd0a2 | |||
| 3fefbaf468 | |||
| 0040520bb0 | |||
| 8d160b277e | |||
| b07d24ef42 | |||
| 57b2a76007 | |||
| 59f696c85b | |||
| e2c0abc1a7 | |||
| 699a20ca03 | |||
| 6529be96cf | |||
| ce42f04ae6 | |||
| 74338d1178 | |||
| 10fc4dd4d8 | |||
| 187842e14c | |||
| 2fa248d4f5 | |||
| cd8c61d7a3 | |||
| 2a14d4c2d6 | |||
| e5e561d648 | |||
| d489de59e0 | |||
| 178975c96b | |||
| 435778c42a | |||
| 2cbad1a610 | |||
| b195e910c6 | |||
| 5221cba645 | |||
| 2a888ad2df | |||
| b61373a30f | |||
| 4f9f04fb96 | |||
| 1c6a359130 | |||
| 6ccbbbc98f | |||
| e657de8583 | |||
| c3d31711b7 | |||
| e545db7da9 | |||
| 4bba066d57 | |||
| 6ce7fc57ed | |||
| ae773d547e | |||
| da2674ded6 | |||
| 77bb4b7429 | |||
| 58e1f233cf | |||
| c364207f3e | |||
| 7bd4d61b8c | |||
| cf9f5cbe6a | |||
| 2128f8e3e2 | |||
| 460e469617 | |||
| 90172c579c | |||
| bcb3251ef5 | |||
| 1bc58c997d | |||
| 95a2256a34 | |||
| 8be6558700 | |||
| 5c98726627 | |||
| 9aadae6a5d | |||
| 7a9a60324d | |||
| 5d734b747b | |||
| e25582780a | |||
| 92926b9346 | |||
| a08cb91891 | |||
| d10aeb49ac | |||
| d905e36fb7 | |||
| 7c642e6dd5 | |||
| 878955b50d | |||
| 6bf3dc91ad | |||
| 38fa586b78 | |||
| 5a7ffb93c9 | |||
| c04053b4e9 | |||
| b1f19e3e91 | |||
| 24e45d494f | |||
| 8d5cfcc2b3 | |||
| 9940a0c544 | |||
| d0c37727c5 | |||
| 21007d8922 | |||
| 3edbe49fa2 | |||
| 3fdc66dd69 | |||
| 5af5e6ca91 | |||
| b40f0bea99 | |||
| 601c65241b | |||
| ccd195d60a | |||
| e60702f428 | |||
| 0f9cece641 | |||
| 64765eb313 | |||
| c6a0615fa5 | |||
| a4b9a8c879 | |||
| 4ee6ed1f98 | |||
| 8c9ad0da69 | |||
| 4691d841a2 | |||
| c64f26ef3c | |||
| fc58ef45d6 | |||
| 28a071f243 | |||
| d42d2f46fb | |||
| 65adb94bf6 |
@@ -132,7 +132,7 @@ jobs:
|
||||
GIT_COMMITTER_NAME: Test
|
||||
NX_E2E_CI_CACHE_KEY: e2e-circleci-<< parameters.os >>
|
||||
SELECTED_PM: << parameters.pm >>
|
||||
NX_E2E_RUN_CYPRESS: 'true'
|
||||
NX_E2E_RUN_E2E: 'true'
|
||||
NX_VERBOSE_LOGGING: 'false'
|
||||
NX_NATIVE_LOGGING: 'false'
|
||||
NX_PERF_LOGGING: 'false'
|
||||
@@ -145,7 +145,7 @@ jobs:
|
||||
- run:
|
||||
name: Set dynamic nx run variable
|
||||
command: |
|
||||
echo "export NX_RUN_GROUP=\"run-group-<< parameters.os >>-$CIRCLE_WORKFLOW_ID\";" >> $BASH_ENV
|
||||
echo "export NX_CI_EXECUTION_ENV=\"<< parameters.os >>\";" >> $BASH_ENV
|
||||
- setup:
|
||||
os: << parameters.os >>
|
||||
- run:
|
||||
@@ -168,7 +168,7 @@ jobs:
|
||||
- run:
|
||||
name: Set dynamic nx run variable
|
||||
command: |
|
||||
echo "export NX_RUN_GROUP=\"run-group-linux-$CIRCLE_WORKFLOW_ID\";" >> $BASH_ENV
|
||||
echo "export NX_CI_EXECUTION_ENV=\"linux\";" >> $BASH_ENV
|
||||
- setup:
|
||||
os: linux
|
||||
- nx/set-shas:
|
||||
@@ -187,7 +187,7 @@ jobs:
|
||||
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 depcheck check-codeowners documentation --parallel=1 --no-dte &
|
||||
pnpm nx run-many -t check-imports check-commit check-lock-files check-codeowners documentation --parallel=1 --no-dte &
|
||||
pids+=($!)
|
||||
|
||||
pnpm nx affected --target=lint --base=$NX_BASE --head=$NX_HEAD --parallel=3 &
|
||||
@@ -208,14 +208,15 @@ jobs:
|
||||
executor: macos
|
||||
environment:
|
||||
NX_E2E_CI_CACHE_KEY: e2e-circleci-macos
|
||||
NX_DAEMON: 'true'
|
||||
NX_DAEMON: 'false' # TODO: set to true after #18410
|
||||
NX_PERF_LOGGING: 'false'
|
||||
SELECTED_PM: 'npm' # explicitly define npm for macOS tests
|
||||
NX_SKIP_NX_CACHE: 'true' # TODO: Remove after #18410
|
||||
steps:
|
||||
- run:
|
||||
name: Set dynamic nx run variable
|
||||
command: |
|
||||
echo "export NX_RUN_GROUP=\"run-group-macos-$CIRCLE_WORKFLOW_ID\";" >> $BASH_ENV
|
||||
echo "export NX_CI_EXECUTION_ENV=\"macos\";" >> $BASH_ENV
|
||||
- setup:
|
||||
os: macos
|
||||
- rust/install
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
"error",
|
||||
{
|
||||
"enforceBuildableLibDependency": true,
|
||||
"checkDynamicDependenciesExceptions": [".*"],
|
||||
"allow": [],
|
||||
"depConstraints": [
|
||||
{
|
||||
|
||||
@@ -5,6 +5,27 @@ _[Please make sure you have read the submission guidelines before posting an PR]
|
||||
|
||||
Thanks for submitting your Nx Plugin to our community plugins list. Make sure to follow these steps to ensure that your PR is approved in a timely manner.
|
||||
|
||||
## Plugin Requirements
|
||||
|
||||
Before you submit your plugin to be listed in our registry, it needs to meet the following requirements:
|
||||
- Run some kind of automated e2e tests in your repository
|
||||
- Include `@nx/devkit` as a `dependency` in the plugin's `package.json`
|
||||
- List a `repository.url` in the plugin's `package.json`
|
||||
|
||||
i.e.
|
||||
|
||||
```
|
||||
{
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nrwl/nx.git",
|
||||
"directory": "packages/web"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Note: We reserve the right to remove unmaintained plugins from the registry. If the plugins become maintained again, they can be resubmitted to the registry.
|
||||
|
||||
## Steps to Submit Your Plugin
|
||||
- Use the following commit message template: `chore(core): nx plugin submission [PLUGIN_NAME]`
|
||||
- Update the `community/approved-plugins.json` file with a new entry for your plugin that includes `name`, `url`, `description`:
|
||||
@@ -21,7 +42,7 @@ Example:
|
||||
}]
|
||||
```
|
||||
|
||||
Once merged, your will plugin will be available when running the `nx list` command, and will also be available in the Plugin browser on [nx.dev](https://nx.dev)
|
||||
Once merged, your plugin will be available when running the `nx list` command, and will also be available in the Plugin Registry on [nx.dev](https://nx.dev/extending-nx/registry)
|
||||
-->
|
||||
|
||||
# Community Plugin Submission
|
||||
|
||||
@@ -415,7 +415,7 @@ jobs:
|
||||
YARN_REGISTRY: http://localhost:4872
|
||||
NX_CACHE_DIRECTORY: 'tmp'
|
||||
NX_E2E_SKIP_BUILD_CLEANUP: 'true'
|
||||
NX_E2E_RUN_CYPRESS: 'true'
|
||||
NX_E2E_RUN_E2E: 'true'
|
||||
NX_E2E_VERBOSE_LOGGING: 'true'
|
||||
NX_PERF_LOGGING: 'false'
|
||||
NX_DAEMON: 'true'
|
||||
|
||||
@@ -303,7 +303,7 @@ jobs:
|
||||
npm_config_registry: http://localhost:4872
|
||||
NX_CACHE_DIRECTORY: 'tmp'
|
||||
NX_E2E_SKIP_BUILD_CLEANUP: 'true'
|
||||
NX_E2E_RUN_CYPRESS: 'true'
|
||||
NX_E2E_RUN_E2E: 'true'
|
||||
NX_E2E_VERBOSE_LOGGING: 'true'
|
||||
NX_PERF_LOGGING: 'false'
|
||||
NX_DAEMON: 'true'
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
name: Generate embeddings
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 5 * * 0,4" # sunday, thursday 5AM
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
cache-and-install:
|
||||
if: github.repository == 'nrwl/nx'
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [18]
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 7
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Setup pnpm cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --no-frozen-lockfile
|
||||
|
||||
- name: Run embeddings script
|
||||
run: pnpm exec nx run tools-documentation-create-embeddings:run-node
|
||||
env:
|
||||
NX_NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NX_NEXT_PUBLIC_SUPABASE_URL }}
|
||||
NX_SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.NX_SUPABASE_SERVICE_ROLE_KEY }}
|
||||
NX_OPENAI_KEY: ${{ secrets.NX_OPENAI_KEY }}
|
||||
@@ -10,9 +10,13 @@ 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
|
||||
|
||||
packages:
|
||||
'@*/*':
|
||||
|
||||
+4
-3
@@ -4,8 +4,8 @@
|
||||
/e2e/**/* @FrozenPandaz @vsavkin @AgentEnder @jaysoo @JamesHenry
|
||||
/scripts/**/* @FrozenPandaz @vsavkin @AgentEnder @jaysoo @JamesHenry
|
||||
/tools/**/* @FrozenPandaz @vsavkin @AgentEnder @jaysoo @JamesHenry
|
||||
package.json @nrwl/nx-pipelines-reviewers
|
||||
pnpm-lock.yaml @nrwl/nx-pipelines-reviewers
|
||||
package.json @nrwl/nx-core-reviewers
|
||||
pnpm-lock.yaml @nrwl/nx-core-reviewers
|
||||
|
||||
# Docs Site + Graph
|
||||
/docs @nrwl/nx-docs-reviewers
|
||||
@@ -99,6 +99,8 @@ pnpm-lock.yaml @nrwl/nx-pipelines-reviewers
|
||||
/e2e/cypress/** @nrwl/nx-testing-tools-reviewers
|
||||
/packages/jest/** @nrwl/nx-testing-tools-reviewers
|
||||
/e2e/jest/** @nrwl/nx-testing-tools-reviewers
|
||||
/packages/playwright/** @nrwl/nx-testing-tools-reviewers
|
||||
/e2e/playwright/** @nrwl/nx-testing-tools-reviewers
|
||||
|
||||
# Linter
|
||||
/docs/generated/packages/eslint-plugin/** @nrwl/nx-linter-reviewers @nrwl/nx-docs-reviewers
|
||||
@@ -159,7 +161,6 @@ pnpm-lock.yaml @nrwl/nx-pipelines-reviewers
|
||||
/CODEOWNERS @FrozenPandaz @AgentEnder
|
||||
|
||||
# Scripts
|
||||
/scripts/depcheck @FrozenPandaz @vsavkin @jaysoo
|
||||
/scripts/documentation @nrwl/nx-docs-reviewers
|
||||
/scripts/angular-support-upgrades @nrwl/nx-angular-reviewers
|
||||
|
||||
|
||||
+2
-2
@@ -76,13 +76,13 @@ Check out [this video for a live walkthrough](https://youtu.be/Tx257WpNsxc) or f
|
||||
- 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 16.0.0 --local` in Terminal 2 - you can choose any nonexistent version number here, but it's recommended to use the next major
|
||||
- Run `pnpm nx-release 17.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@17.0.0` in Terminal 2
|
||||
|
||||
If you have problems publishing, make sure you use Node 18 and NPM 8.
|
||||
|
||||
**NOTE:** To use this newly published local version, you need to make a new workspace or change all of your target packages to this new version, eg: `"nx": "^16.0.0",` and re-run `pnpm i` in your testing project.
|
||||
**NOTE:** To use this newly published local version, you need to make a new workspace or change all of your target packages to this new version, eg: `"nx": "^17.0.0",` and re-run `pnpm i` in your testing project.
|
||||
|
||||
### Publishing for Yarn 2+ (Berry)
|
||||
|
||||
|
||||
Generated
+613
-20
@@ -2,6 +2,16 @@
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "Inflector"
|
||||
version = "0.11.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"regex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ahash"
|
||||
version = "0.8.3"
|
||||
@@ -9,6 +19,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"getrandom",
|
||||
"once_cell",
|
||||
"version_check",
|
||||
]
|
||||
@@ -22,6 +33,15 @@ dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "allocator-api2"
|
||||
version = "0.2.14"
|
||||
@@ -48,6 +68,19 @@ dependencies = [
|
||||
"tempfile",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ast_node"
|
||||
version = "0.9.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c09c69dffe06d222d072c878c3afe86eee2179806f20503faec97250268b4c24"
|
||||
dependencies = [
|
||||
"pmutil",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"swc_macros_common",
|
||||
"syn 2.0.15",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-priority-channel"
|
||||
version = "0.1.0"
|
||||
@@ -102,6 +135,15 @@ version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||
|
||||
[[package]]
|
||||
name = "better_scoped_tls"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "794edcc9b3fb07bb4aecaa11f093fd45663b4feadb782d68303a2268bc2701de"
|
||||
dependencies = [
|
||||
"scoped-tls",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.3.2"
|
||||
@@ -110,9 +152,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "2.2.1"
|
||||
version = "2.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "24a6904aef64d73cf10ab17ebace7befb918b82164785cb89907993be7f83813"
|
||||
checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42"
|
||||
|
||||
[[package]]
|
||||
name = "bstr"
|
||||
@@ -122,7 +164,7 @@ checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"once_cell",
|
||||
"regex-automata",
|
||||
"regex-automata 0.1.10",
|
||||
"serde",
|
||||
]
|
||||
|
||||
@@ -355,6 +397,27 @@ version = "1.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
||||
|
||||
[[package]]
|
||||
name = "form_urlencoded"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652"
|
||||
dependencies = [
|
||||
"percent-encoding",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "from_variant"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "03ec5dc38ee19078d84a692b1c41181ff9f94331c76cee66ff0208c770b5e54f"
|
||||
dependencies = [
|
||||
"pmutil",
|
||||
"proc-macro2",
|
||||
"swc_macros_common",
|
||||
"syn 2.0.15",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fs_extra"
|
||||
version = "1.3.0"
|
||||
@@ -512,7 +575,7 @@ version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "786861e84a5793ad5f863d846de5eb064cd23b87e61ad708c8c402608202e7be"
|
||||
dependencies = [
|
||||
"bitflags 2.2.1",
|
||||
"bitflags 2.3.3",
|
||||
"bstr",
|
||||
"gix-path",
|
||||
"libc",
|
||||
@@ -558,7 +621,7 @@ version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c07c98204529ac3f24b34754540a852593d2a4c7349008df389240266627a72a"
|
||||
dependencies = [
|
||||
"bitflags 2.2.1",
|
||||
"bitflags 2.3.3",
|
||||
"bstr",
|
||||
"gix-features",
|
||||
"gix-path",
|
||||
@@ -642,7 +705,7 @@ version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "794520043d5a024dfeac335c6e520cb616f6963e30dab995892382e998c12897"
|
||||
dependencies = [
|
||||
"bitflags 2.2.1",
|
||||
"bitflags 2.3.3",
|
||||
"gix-path",
|
||||
"libc",
|
||||
"windows",
|
||||
@@ -686,7 +749,7 @@ version = "0.4.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"aho-corasick 0.7.20",
|
||||
"bstr",
|
||||
"fnv",
|
||||
"log",
|
||||
@@ -754,6 +817,16 @@ dependencies = [
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "idna"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c"
|
||||
dependencies = [
|
||||
"unicode-bidi",
|
||||
"unicode-normalization",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ignore"
|
||||
version = "0.4.20"
|
||||
@@ -829,6 +902,19 @@ dependencies = [
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "is-macro"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f4467ed1321b310c2625c5aa6c1b1ffc5de4d9e42668cf697a08fb033ee8265e"
|
||||
dependencies = [
|
||||
"Inflector",
|
||||
"pmutil",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.15",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.10.5"
|
||||
@@ -870,6 +956,79 @@ version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "lexical"
|
||||
version = "6.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7aefb36fd43fef7003334742cbf77b243fcd36418a1d1bdd480d613a67968f6"
|
||||
dependencies = [
|
||||
"lexical-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lexical-core"
|
||||
version = "0.8.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46"
|
||||
dependencies = [
|
||||
"lexical-parse-float",
|
||||
"lexical-parse-integer",
|
||||
"lexical-util",
|
||||
"lexical-write-float",
|
||||
"lexical-write-integer",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lexical-parse-float"
|
||||
version = "0.8.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f"
|
||||
dependencies = [
|
||||
"lexical-parse-integer",
|
||||
"lexical-util",
|
||||
"static_assertions",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lexical-parse-integer"
|
||||
version = "0.8.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9"
|
||||
dependencies = [
|
||||
"lexical-util",
|
||||
"static_assertions",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lexical-util"
|
||||
version = "0.8.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc"
|
||||
dependencies = [
|
||||
"static_assertions",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lexical-write-float"
|
||||
version = "0.8.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862"
|
||||
dependencies = [
|
||||
"lexical-util",
|
||||
"lexical-write-integer",
|
||||
"static_assertions",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lexical-write-integer"
|
||||
version = "0.8.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446"
|
||||
dependencies = [
|
||||
"lexical-util",
|
||||
"static_assertions",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.139"
|
||||
@@ -917,7 +1076,7 @@ version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
|
||||
dependencies = [
|
||||
"regex-automata",
|
||||
"regex-automata 0.1.10",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1001,7 +1160,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49ac8112fe5998579b22e29903c7b277fc7f91c7860c0236f35792caf8156e18"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.2.1",
|
||||
"bitflags 2.3.3",
|
||||
"ctor",
|
||||
"napi-derive",
|
||||
"napi-sys",
|
||||
@@ -1053,6 +1212,12 @@ dependencies = [
|
||||
"libloading",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "new_debug_unreachable"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
|
||||
|
||||
[[package]]
|
||||
name = "nibble_vec"
|
||||
version = "0.1.0"
|
||||
@@ -1120,6 +1285,28 @@ dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-bigint"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"num-integer",
|
||||
"num-traits",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-integer"
|
||||
version = "0.1.45"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.2.15"
|
||||
@@ -1165,7 +1352,14 @@ dependencies = [
|
||||
"napi",
|
||||
"napi-build",
|
||||
"napi-derive",
|
||||
"once_cell",
|
||||
"rayon",
|
||||
"regex",
|
||||
"swc_common",
|
||||
"swc_ecma_ast",
|
||||
"swc_ecma_dep_graph",
|
||||
"swc_ecma_parser",
|
||||
"swc_ecma_visit",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"tracing",
|
||||
@@ -1180,9 +1374,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.17.1"
|
||||
version = "1.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
|
||||
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
|
||||
|
||||
[[package]]
|
||||
name = "overload"
|
||||
@@ -1213,13 +1407,19 @@ dependencies = [
|
||||
"windows-sys 0.45.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "percent-encoding"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
|
||||
|
||||
[[package]]
|
||||
name = "phf"
|
||||
version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c"
|
||||
dependencies = [
|
||||
"phf_shared",
|
||||
"phf_shared 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1228,8 +1428,18 @@ version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a56ac890c5e3ca598bbdeaa99964edb5b0258a583a9eb6ef4e89fc85d9224770"
|
||||
dependencies = [
|
||||
"phf_generator",
|
||||
"phf_shared",
|
||||
"phf_generator 0.11.1",
|
||||
"phf_shared 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_generator"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
|
||||
dependencies = [
|
||||
"phf_shared 0.10.0",
|
||||
"rand",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1238,10 +1448,19 @@ version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf"
|
||||
dependencies = [
|
||||
"phf_shared",
|
||||
"phf_shared 0.11.1",
|
||||
"rand",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_shared"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
|
||||
dependencies = [
|
||||
"siphasher",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_shared"
|
||||
version = "0.11.1"
|
||||
@@ -1263,6 +1482,29 @@ version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
|
||||
|
||||
[[package]]
|
||||
name = "pmutil"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "52a40bc70c2c58040d2d8b167ba9a5ff59fc9dab7ad44771cfde3dcfde7a09c6"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.15",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ppv-lite86"
|
||||
version = "0.2.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
|
||||
|
||||
[[package]]
|
||||
name = "precomputed-hash"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
|
||||
|
||||
[[package]]
|
||||
name = "predicates"
|
||||
version = "2.1.5"
|
||||
@@ -1310,6 +1552,15 @@ dependencies = [
|
||||
"tokio-stream",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "psm"
|
||||
version = "0.1.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.27"
|
||||
@@ -1335,6 +1586,18 @@ version = "0.8.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"rand_chacha",
|
||||
"rand_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_chacha"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
||||
dependencies = [
|
||||
"ppv-lite86",
|
||||
"rand_core",
|
||||
]
|
||||
|
||||
@@ -1343,6 +1606,9 @@ name = "rand_core"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon"
|
||||
@@ -1397,13 +1663,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.7.0"
|
||||
version = "1.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a"
|
||||
checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"aho-corasick 1.0.2",
|
||||
"memchr",
|
||||
"regex-syntax",
|
||||
"regex-automata 0.3.3",
|
||||
"regex-syntax 0.7.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1412,7 +1679,18 @@ version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
|
||||
dependencies = [
|
||||
"regex-syntax",
|
||||
"regex-syntax 0.6.28",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310"
|
||||
dependencies = [
|
||||
"aho-corasick 1.0.2",
|
||||
"memchr",
|
||||
"regex-syntax 0.7.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1421,6 +1699,18 @@ version = "0.6.28"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2"
|
||||
|
||||
[[package]]
|
||||
name = "rustc-hash"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "0.37.3"
|
||||
@@ -1444,6 +1734,12 @@ dependencies = [
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scoped-tls"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.1.0"
|
||||
@@ -1461,6 +1757,20 @@ name = "serde"
|
||||
version = "1.0.152"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.152"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.107",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha1_smol"
|
||||
@@ -1507,12 +1817,232 @@ version = "1.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
|
||||
|
||||
[[package]]
|
||||
name = "smartstring"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"static_assertions",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "stable_deref_trait"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
|
||||
|
||||
[[package]]
|
||||
name = "stacker"
|
||||
version = "0.1.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"psm",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "static_assertions"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
||||
|
||||
[[package]]
|
||||
name = "string_cache"
|
||||
version = "0.8.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b"
|
||||
dependencies = [
|
||||
"new_debug_unreachable",
|
||||
"once_cell",
|
||||
"parking_lot",
|
||||
"phf_shared 0.10.0",
|
||||
"precomputed-hash",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "string_cache_codegen"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988"
|
||||
dependencies = [
|
||||
"phf_generator 0.10.0",
|
||||
"phf_shared 0.10.0",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "string_enum"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8fa4d4f81d7c05b9161f8de839975d3326328b8ba2831164b465524cc2f55252"
|
||||
dependencies = [
|
||||
"pmutil",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"swc_macros_common",
|
||||
"syn 2.0.15",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "swc_atoms"
|
||||
version = "0.5.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3b1370fa1d31e18a999928aaf18f166616b16c5cb7033ced7d50d06858c5fd90"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"rustc-hash",
|
||||
"serde",
|
||||
"string_cache",
|
||||
"string_cache_codegen",
|
||||
"triomphe",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "swc_common"
|
||||
version = "0.31.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c6414bd4e553f5638961d39b07075ffd37a3d63176829592f4a5900260d94ca1"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"ast_node",
|
||||
"better_scoped_tls",
|
||||
"cfg-if",
|
||||
"either",
|
||||
"from_variant",
|
||||
"new_debug_unreachable",
|
||||
"num-bigint",
|
||||
"once_cell",
|
||||
"rustc-hash",
|
||||
"serde",
|
||||
"siphasher",
|
||||
"string_cache",
|
||||
"swc_atoms",
|
||||
"swc_eq_ignore_macros",
|
||||
"swc_visit",
|
||||
"tracing",
|
||||
"unicode-width",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "swc_ecma_ast"
|
||||
version = "0.107.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5693558188efdd5b664e517b69ba8056a7f64c214ca8cd034e3ae8314566b866"
|
||||
dependencies = [
|
||||
"bitflags 2.3.3",
|
||||
"is-macro",
|
||||
"num-bigint",
|
||||
"scoped-tls",
|
||||
"string_enum",
|
||||
"swc_atoms",
|
||||
"swc_common",
|
||||
"unicode-id",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "swc_ecma_dep_graph"
|
||||
version = "0.109.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4535c2a8210bf69f78201f93e6dc741a81046d1c04479e41d26849155752d184"
|
||||
dependencies = [
|
||||
"swc_atoms",
|
||||
"swc_common",
|
||||
"swc_ecma_ast",
|
||||
"swc_ecma_visit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "swc_ecma_parser"
|
||||
version = "0.137.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ea1915adb15d9ca1695e76d41524beb4806e9b603280edb7eedbaebe706a41c"
|
||||
dependencies = [
|
||||
"either",
|
||||
"lexical",
|
||||
"num-bigint",
|
||||
"serde",
|
||||
"smallvec",
|
||||
"smartstring",
|
||||
"stacker",
|
||||
"swc_atoms",
|
||||
"swc_common",
|
||||
"swc_ecma_ast",
|
||||
"tracing",
|
||||
"typed-arena",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "swc_ecma_visit"
|
||||
version = "0.93.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "82bb87ee3345a7049efcbedc419f121933e0e3967457922848d0026fb3b79dac"
|
||||
dependencies = [
|
||||
"num-bigint",
|
||||
"swc_atoms",
|
||||
"swc_common",
|
||||
"swc_ecma_ast",
|
||||
"swc_visit",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "swc_eq_ignore_macros"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05a95d367e228d52484c53336991fdcf47b6b553ef835d9159db4ba40efb0ee8"
|
||||
dependencies = [
|
||||
"pmutil",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.15",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "swc_macros_common"
|
||||
version = "0.3.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7a273205ccb09b51fabe88c49f3b34c5a4631c4c00a16ae20e03111d6a42e832"
|
||||
dependencies = [
|
||||
"pmutil",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.15",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "swc_visit"
|
||||
version = "0.5.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e87c337fbb2d191bf371173dea6a957f01899adb8f189c6c31b122a6cfc98fc3"
|
||||
dependencies = [
|
||||
"either",
|
||||
"swc_visit_macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "swc_visit_macros"
|
||||
version = "0.5.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0f322730fb82f3930a450ac24de8c98523af7d34ab8cb2f46bcb405839891a99"
|
||||
dependencies = [
|
||||
"Inflector",
|
||||
"pmutil",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"swc_macros_common",
|
||||
"syn 2.0.15",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.107"
|
||||
@@ -1625,6 +2155,21 @@ dependencies = [
|
||||
"time-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tinyvec"
|
||||
version = "1.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
|
||||
dependencies = [
|
||||
"tinyvec_macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tinyvec_macros"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.28.2"
|
||||
@@ -1727,18 +2272,55 @@ dependencies = [
|
||||
"tracing-log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "triomphe"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0eee8098afad3fb0c54a9007aab6804558410503ad676d4633f9c2559a00ac0f"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"stable_deref_trait",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "typed-arena"
|
||||
version = "2.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-bidi"
|
||||
version = "0.3.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-bom"
|
||||
version = "2.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "98e90c70c9f0d4d1ee6d0a7d04aa06cb9bbd53d8cfbdd62a0269a7c2eb640552"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-id"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d70b6494226b36008c8366c288d77190b3fad2eb4c10533139c1c1f461127f1a"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-normalization"
|
||||
version = "0.1.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
|
||||
dependencies = [
|
||||
"tinyvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.10.0"
|
||||
@@ -1751,6 +2333,17 @@ version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
|
||||
|
||||
[[package]]
|
||||
name = "url"
|
||||
version = "2.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb"
|
||||
dependencies = [
|
||||
"form_urlencoded",
|
||||
"idna",
|
||||
"percent-encoding",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "valuable"
|
||||
version = "0.1.0"
|
||||
|
||||
@@ -25,20 +25,20 @@
|
||||
"url": "https://github.com/nxkit/nxkit"
|
||||
},
|
||||
{
|
||||
"name": "nx-plugins",
|
||||
"description": "Nx plugin integrations with ESBuild / Vite / Snowpack / Prisma, with derived ESBuild / Snowpack / ... plugins.",
|
||||
"name": "nx-plugin-vite",
|
||||
"description": "Nx plugin integrations with Vite.",
|
||||
"url": "https://nx-plugins.netlify.app/"
|
||||
},
|
||||
{
|
||||
"name": "@codebrew/nx-aws-cdk",
|
||||
"description": "An Nx plugin for aws cdk develop.",
|
||||
"url": "https://github.com/codebrewlab/nx-plugins/tree/main/packages/nx-aws-cdk"
|
||||
},
|
||||
{
|
||||
"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-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.",
|
||||
@@ -69,21 +69,11 @@
|
||||
"description": "An Nx plugin for developing cross-platform applications using Capacitor",
|
||||
"url": "https://github.com/nxext/nx-extensions/tree/main/packages/capacitor"
|
||||
},
|
||||
{
|
||||
"name": "@nxtend/firebase",
|
||||
"description": "An Nx plugin for developing applications using Firebase",
|
||||
"url": "https://github.com/nxtend-team/nxtend/tree/main/packages/firebase"
|
||||
},
|
||||
{
|
||||
"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": "@offeringsolutions/nx-karma-to-jest",
|
||||
"description": "Nx plugin for replacing karma with jest in an Nx workspace",
|
||||
"url": "https://github.com/FabianGosebrink/nx-karma-to-jest"
|
||||
},
|
||||
{
|
||||
"name": "@flowaccount/nx-serverless",
|
||||
"description": "Nx plugin for node/angular-universal schematics and deployment builders in an Nx workspace",
|
||||
@@ -104,21 +94,6 @@
|
||||
"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": "@dev-thought/nx-deploy-it",
|
||||
"description": "Nx plugin to deploy applications on your favorite cloud provider",
|
||||
"url": "https://github.com/Dev-Thought/nx-plugins/tree/master/libs/nx-deploy-it"
|
||||
},
|
||||
{
|
||||
"name": "@offeringsolutions/nx-protractor-to-cypress",
|
||||
"description": "Nx plugin to replace protractor with cypress in an nx workspace",
|
||||
"url": "https://github.com/FabianGosebrink/nx-protractor-to-cypress"
|
||||
},
|
||||
{
|
||||
"name": "@angular-custom-builders/lite-serve",
|
||||
"description": "Nx plugin to run the e2e test on an existing dist folder",
|
||||
"url": "https://github.com/mauriziovitale/angular-plugins/tree/master/libs/lite-serve"
|
||||
},
|
||||
{
|
||||
"name": "@nx-plus/nuxt",
|
||||
"description": "Nx plugin adding first class support for Nuxt in your Nx workspace.",
|
||||
@@ -169,11 +144,6 @@
|
||||
"description": "Nx plugin to use SolidJS within nx workspaces",
|
||||
"url": "https://github.com/nxext/nx-extensions/tree/master/packages/solid"
|
||||
},
|
||||
{
|
||||
"name": "@joelcode/gcp-function",
|
||||
"description": "Nx plugin to generate, test, lint, build, serve, & deploy Google Cloud Function",
|
||||
"url": "https://github.com/JoelCode/gcp-function"
|
||||
},
|
||||
{
|
||||
"name": "@nx-go/nx-go",
|
||||
"description": "Nx plugin to use Go in a Nx workspace",
|
||||
@@ -225,12 +195,7 @@
|
||||
"url": "https://github.com/bikecoders/ngx-deploy-npm"
|
||||
},
|
||||
{
|
||||
"name": "@trafilea/nx-shopify",
|
||||
"description": "Nx plugin for developing performance-first Shopify themes",
|
||||
"url": "https://github.com/trafilea/nx-shopify"
|
||||
},
|
||||
{
|
||||
"name": "nx-dotnet",
|
||||
"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"
|
||||
},
|
||||
@@ -309,11 +274,6 @@
|
||||
"description": "Nx Plugin adding first class support for NativeScript in your Nx workspace",
|
||||
"url": "https://github.com/nativescript/nx"
|
||||
},
|
||||
{
|
||||
"name": "@nx-clean/plugin-core",
|
||||
"description": "Nx Plugin to generate projects following Clean Architecture practices",
|
||||
"url": "https://github.com/guiseek/nx-clean/tree/main/libs/plugin/core"
|
||||
},
|
||||
{
|
||||
"name": "@jnxplus/nx-boot-gradle",
|
||||
"description": "Nx plugin to add Spring Boot and Gradle multi-project builds support to Nx workspace",
|
||||
|
||||
+27
-1
@@ -67,6 +67,16 @@ You can add specific languages and a filename on the code snippet displayed.
|
||||
```
|
||||
````
|
||||
|
||||
#### Terminal command
|
||||
|
||||
To display a terminal command, use:
|
||||
|
||||
````
|
||||
```shell
|
||||
npx nx build
|
||||
```
|
||||
````
|
||||
|
||||
#### Terminal Output
|
||||
|
||||
You can display your terminal output with a dedicated component the same way you would show code.
|
||||
@@ -85,6 +95,14 @@ You can optionally also pass a `path` like
|
||||
```
|
||||
````
|
||||
|
||||
#### Terminal Video Output
|
||||
|
||||
You can have a more dynamic visualization of a terminal output by using the following component:
|
||||
|
||||
```
|
||||
{% terminal-video src="/documentation/shared/images/caching/cache-terminal-animation.mp4" /%}
|
||||
```
|
||||
|
||||
#### Custom iframes
|
||||
|
||||
We can display a special iframe and setting its width inside the document.
|
||||
@@ -111,7 +129,7 @@ We can display a special button inviting the reader to go to a GitHub repository
|
||||
You can add an "open in stackblitz" button as follows:
|
||||
|
||||
```markdown
|
||||
{% stackblitz-button url="github.com/nrwl/nx-recipes/tree/main/standalone-angular-app?file=README.md" /%}
|
||||
{% stackblitz-button url="github.com/nrwl/nx-recipes/tree/main/angular-standalone?file=README.md" /%}
|
||||
```
|
||||
|
||||
#### Install Nx Console
|
||||
@@ -170,6 +188,14 @@ title="Nx Console Run UI Form"
|
||||
width="100%" /%}
|
||||
```
|
||||
|
||||
#### Youtube Section Link
|
||||
|
||||
Have a more decent button-like widget that you can place below sections of a tutorial with a link to a specific point in a Youtube video.
|
||||
|
||||
```markdown
|
||||
{% video-link link="https://youtu.be/OQ-Zc5tcxJE?t=64" /%}
|
||||
```
|
||||
|
||||
#### Graph
|
||||
|
||||
Embed an Nx Graph visualization that can be panned by the user.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{% youtube
|
||||
src="https://www.youtube.com/embed/KBFQZw5ynFs"
|
||||
title="What's new in Nx 15.3?"
|
||||
width="100%" /%}
|
||||
/%}
|
||||
Here are some of our feature highlights:
|
||||
|
||||
{% cards cols="2" %}
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
{% youtube
|
||||
src="https://www.youtube.com/embed/G02THNy3PcE"
|
||||
title="Nx 15.4 is out! Here's all you need to know"
|
||||
width="100%" /%}
|
||||
/%}
|
||||
|
||||
Here are some of our feature highlights:
|
||||
|
||||
{% cards cols="2" %}
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
{% youtube
|
||||
src="https://www.youtube.com/embed/IStJODzZSoc"
|
||||
title="What's new in Nx 15.7?"
|
||||
width="100%" /%}
|
||||
/%}
|
||||
|
||||
Here are some of our feature highlights:
|
||||
|
||||
{% cards cols="2" %}
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
{% youtube
|
||||
src="https://www.youtube.com/embed/4XdHT5Y7zj4"
|
||||
title="Nx 15.8 - All you need to know!"
|
||||
width="100%" /%}
|
||||
/%}
|
||||
|
||||
Here are some of our feature highlights:
|
||||
|
||||
{% cards cols="2" %}
|
||||
|
||||
@@ -5,7 +5,8 @@ We’re proud to announce the release of Nx version 16!
|
||||
{% youtube
|
||||
src="https://www.youtube.com/embed/JIhOyJtuxEA"
|
||||
title="Nx 16.0 Release"
|
||||
width="100%" /%}
|
||||
/%}
|
||||
|
||||
Here are some of our feature highlights:
|
||||
|
||||
{% cards cols="2" %}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Nx 16.5
|
||||
|
||||
[Read the 16.5 release blog post](https://blog.nrwl.io/nx-16-5-release-7887a27cb5)
|
||||
|
||||
{% youtube
|
||||
src="https://www.youtube.com/embed/7XLoLOc3afY"
|
||||
title="Nx 16.5 Release!!!!"
|
||||
/%}
|
||||
|
||||
Feature highlights:
|
||||
|
||||
{% cards cols="2" %}
|
||||
{% card title="Targeting Tasks by Tags" type="video" url="https://youtu.be/enQDQmFquGU" /%}
|
||||
{% card title="Nx Verdaccio Support" type="video" url="https://youtu.be/t1c925TzrzE" /%}
|
||||
{% card title="externalDependencies Input Type" type="video" url="https://youtu.be/FRqgWBmHmAU" /%}
|
||||
{% card title="Nx Console Revamped" type="video" url="https://youtu.be/p455D4W7330" /%}
|
||||
{% /cards %}
|
||||
@@ -79,6 +79,14 @@ Type: `boolean`
|
||||
|
||||
Generate a Dockerfile for the Node API
|
||||
|
||||
### e2eTestRunner
|
||||
|
||||
Type: `string`
|
||||
|
||||
Choices: [cypress, playwright, none]
|
||||
|
||||
Test runner to use for end to end (E2E) tests.
|
||||
|
||||
### framework
|
||||
|
||||
Type: `string`
|
||||
|
||||
@@ -61,6 +61,14 @@ Type: `boolean`
|
||||
|
||||
Set up distributed caching with Nx Cloud.
|
||||
|
||||
### useDotNxInstallation
|
||||
|
||||
Type: `boolean`
|
||||
|
||||
Default: `false`
|
||||
|
||||
Initialize an Nx workspace setup in the .nx directory of the current repository.
|
||||
|
||||
### version
|
||||
|
||||
Type: `boolean`
|
||||
|
||||
@@ -159,7 +159,7 @@ Show only projects that have a specific target
|
||||
|
||||
### project
|
||||
|
||||
Show a list of targets in the workspace.
|
||||
Shows resolved project configuration for a given project.
|
||||
|
||||
```shell
|
||||
nx show project <projectName>
|
||||
@@ -177,7 +177,7 @@ Show help
|
||||
|
||||
Type: `string`
|
||||
|
||||
Show targets for the given project
|
||||
Which project should be viewed?
|
||||
|
||||
##### version
|
||||
|
||||
|
||||
+51
-51
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"/plugins/intro": {
|
||||
"/extending-nx/intro": {
|
||||
"id": "intro",
|
||||
"name": "Intro",
|
||||
"description": "Learn about plugins.",
|
||||
@@ -12,7 +12,7 @@
|
||||
"file": "shared/plugins/intro",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/intro/getting-started",
|
||||
"path": "/extending-nx/intro/getting-started",
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
@@ -22,35 +22,35 @@
|
||||
"file": "",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/registry",
|
||||
"path": "/extending-nx/registry",
|
||||
"tags": []
|
||||
}
|
||||
],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/intro",
|
||||
"path": "/extending-nx/intro",
|
||||
"tags": []
|
||||
},
|
||||
"/plugins/intro/getting-started": {
|
||||
"/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.",
|
||||
"file": "shared/plugins/intro",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/intro/getting-started",
|
||||
"path": "/extending-nx/intro/getting-started",
|
||||
"tags": []
|
||||
},
|
||||
"/plugins/registry": {
|
||||
"/extending-nx/registry": {
|
||||
"id": "registry",
|
||||
"name": "Plugin Registry",
|
||||
"description": "Browse official and community plugins",
|
||||
"file": "",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/registry",
|
||||
"path": "/extending-nx/registry",
|
||||
"tags": []
|
||||
},
|
||||
"/plugins/tutorials": {
|
||||
"/extending-nx/tutorials": {
|
||||
"id": "tutorials",
|
||||
"name": "5 Min Tutorials",
|
||||
"description": "Get started with plugins",
|
||||
@@ -63,7 +63,7 @@
|
||||
"file": "shared/plugins/create-plugin",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/tutorials/create-plugin",
|
||||
"path": "/extending-nx/tutorials/create-plugin",
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
@@ -73,35 +73,35 @@
|
||||
"file": "shared/plugins/maintain-published-plugin",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/tutorials/publish-plugin",
|
||||
"path": "/extending-nx/tutorials/publish-plugin",
|
||||
"tags": []
|
||||
}
|
||||
],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/tutorials",
|
||||
"path": "/extending-nx/tutorials",
|
||||
"tags": []
|
||||
},
|
||||
"/plugins/tutorials/create-plugin": {
|
||||
"/extending-nx/tutorials/create-plugin": {
|
||||
"id": "create-plugin",
|
||||
"name": "Create a Local Plugin",
|
||||
"description": "",
|
||||
"file": "shared/plugins/create-plugin",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/tutorials/create-plugin",
|
||||
"path": "/extending-nx/tutorials/create-plugin",
|
||||
"tags": []
|
||||
},
|
||||
"/plugins/tutorials/publish-plugin": {
|
||||
"/extending-nx/tutorials/publish-plugin": {
|
||||
"id": "publish-plugin",
|
||||
"name": "Maintain a Published Plugin",
|
||||
"description": "",
|
||||
"file": "shared/plugins/maintain-published-plugin",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/tutorials/publish-plugin",
|
||||
"path": "/extending-nx/tutorials/publish-plugin",
|
||||
"tags": []
|
||||
},
|
||||
"/plugins/recipes": {
|
||||
"/extending-nx/recipes": {
|
||||
"id": "recipes",
|
||||
"name": "Recipes",
|
||||
"description": "Focused instructions to complete a specific task",
|
||||
@@ -114,7 +114,7 @@
|
||||
"file": "shared/recipes/plugins/local-executors",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/local-executors",
|
||||
"path": "/extending-nx/recipes/local-executors",
|
||||
"tags": ["use-task-executors"]
|
||||
},
|
||||
{
|
||||
@@ -124,7 +124,7 @@
|
||||
"file": "shared/recipes/plugins/compose-executors",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/compose-executors",
|
||||
"path": "/extending-nx/recipes/compose-executors",
|
||||
"tags": ["use-task-executors"]
|
||||
},
|
||||
{
|
||||
@@ -134,7 +134,7 @@
|
||||
"file": "shared/recipes/generators/local-generators",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/local-generators",
|
||||
"path": "/extending-nx/recipes/local-generators",
|
||||
"tags": ["use-code-generators"]
|
||||
},
|
||||
{
|
||||
@@ -144,7 +144,7 @@
|
||||
"file": "shared/recipes/generators/composing-generators",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/composing-generators",
|
||||
"path": "/extending-nx/recipes/composing-generators",
|
||||
"tags": ["use-code-generators"]
|
||||
},
|
||||
{
|
||||
@@ -154,7 +154,7 @@
|
||||
"file": "shared/recipes/generators/generator-options",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/generator-options",
|
||||
"path": "/extending-nx/recipes/generator-options",
|
||||
"tags": ["use-code-generators"]
|
||||
},
|
||||
{
|
||||
@@ -164,7 +164,7 @@
|
||||
"file": "shared/recipes/generators/creating-files",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/creating-files",
|
||||
"path": "/extending-nx/recipes/creating-files",
|
||||
"tags": ["use-code-generators"]
|
||||
},
|
||||
{
|
||||
@@ -174,7 +174,7 @@
|
||||
"file": "shared/recipes/generators/modifying-files",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/modifying-files",
|
||||
"path": "/extending-nx/recipes/modifying-files",
|
||||
"tags": ["use-code-generators"]
|
||||
},
|
||||
{
|
||||
@@ -184,7 +184,7 @@
|
||||
"file": "shared/recipes/plugins/migration-generators",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/migration-generators",
|
||||
"path": "/extending-nx/recipes/migration-generators",
|
||||
"tags": ["create-your-own-plugin"]
|
||||
},
|
||||
{
|
||||
@@ -194,7 +194,7 @@
|
||||
"file": "shared/recipes/plugins/create-preset",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/create-preset",
|
||||
"path": "/extending-nx/recipes/create-preset",
|
||||
"tags": ["create-your-own-plugin"]
|
||||
},
|
||||
{
|
||||
@@ -204,7 +204,7 @@
|
||||
"file": "shared/recipes/plugins/project-graph-plugins",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/project-graph-plugins",
|
||||
"path": "/extending-nx/recipes/project-graph-plugins",
|
||||
"tags": ["create-your-own-plugin", "explore-graph"]
|
||||
},
|
||||
{
|
||||
@@ -214,122 +214,122 @@
|
||||
"file": "shared/recipes/plugins/project-inference-plugins",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/project-inference-plugins",
|
||||
"path": "/extending-nx/recipes/project-inference-plugins",
|
||||
"tags": ["create-your-own-plugin"]
|
||||
}
|
||||
],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes",
|
||||
"path": "/extending-nx/recipes",
|
||||
"tags": []
|
||||
},
|
||||
"/plugins/recipes/local-executors": {
|
||||
"/extending-nx/recipes/local-executors": {
|
||||
"id": "local-executors",
|
||||
"name": "Write a Simple Executor",
|
||||
"description": "",
|
||||
"file": "shared/recipes/plugins/local-executors",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/local-executors",
|
||||
"path": "/extending-nx/recipes/local-executors",
|
||||
"tags": ["use-task-executors"]
|
||||
},
|
||||
"/plugins/recipes/compose-executors": {
|
||||
"/extending-nx/recipes/compose-executors": {
|
||||
"id": "compose-executors",
|
||||
"name": "Compose Executors",
|
||||
"description": "",
|
||||
"file": "shared/recipes/plugins/compose-executors",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/compose-executors",
|
||||
"path": "/extending-nx/recipes/compose-executors",
|
||||
"tags": ["use-task-executors"]
|
||||
},
|
||||
"/plugins/recipes/local-generators": {
|
||||
"/extending-nx/recipes/local-generators": {
|
||||
"id": "local-generators",
|
||||
"name": "Write a Simple Generator",
|
||||
"description": "",
|
||||
"file": "shared/recipes/generators/local-generators",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/local-generators",
|
||||
"path": "/extending-nx/recipes/local-generators",
|
||||
"tags": ["use-code-generators"]
|
||||
},
|
||||
"/plugins/recipes/composing-generators": {
|
||||
"/extending-nx/recipes/composing-generators": {
|
||||
"id": "composing-generators",
|
||||
"name": "Compose Generators",
|
||||
"description": "",
|
||||
"file": "shared/recipes/generators/composing-generators",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/composing-generators",
|
||||
"path": "/extending-nx/recipes/composing-generators",
|
||||
"tags": ["use-code-generators"]
|
||||
},
|
||||
"/plugins/recipes/generator-options": {
|
||||
"/extending-nx/recipes/generator-options": {
|
||||
"id": "generator-options",
|
||||
"name": "Provide Options for Generators",
|
||||
"description": "",
|
||||
"file": "shared/recipes/generators/generator-options",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/generator-options",
|
||||
"path": "/extending-nx/recipes/generator-options",
|
||||
"tags": ["use-code-generators"]
|
||||
},
|
||||
"/plugins/recipes/creating-files": {
|
||||
"/extending-nx/recipes/creating-files": {
|
||||
"id": "creating-files",
|
||||
"name": "Create Files",
|
||||
"description": "",
|
||||
"file": "shared/recipes/generators/creating-files",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/creating-files",
|
||||
"path": "/extending-nx/recipes/creating-files",
|
||||
"tags": ["use-code-generators"]
|
||||
},
|
||||
"/plugins/recipes/modifying-files": {
|
||||
"/extending-nx/recipes/modifying-files": {
|
||||
"id": "modifying-files",
|
||||
"name": "Modify Files",
|
||||
"description": "",
|
||||
"file": "shared/recipes/generators/modifying-files",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/modifying-files",
|
||||
"path": "/extending-nx/recipes/modifying-files",
|
||||
"tags": ["use-code-generators"]
|
||||
},
|
||||
"/plugins/recipes/migration-generators": {
|
||||
"/extending-nx/recipes/migration-generators": {
|
||||
"id": "migration-generators",
|
||||
"name": "Write a Migration",
|
||||
"description": "",
|
||||
"file": "shared/recipes/plugins/migration-generators",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/migration-generators",
|
||||
"path": "/extending-nx/recipes/migration-generators",
|
||||
"tags": ["create-your-own-plugin"]
|
||||
},
|
||||
"/plugins/recipes/create-preset": {
|
||||
"/extending-nx/recipes/create-preset": {
|
||||
"id": "create-preset",
|
||||
"name": "Create a Preset",
|
||||
"description": "",
|
||||
"file": "shared/recipes/plugins/create-preset",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/create-preset",
|
||||
"path": "/extending-nx/recipes/create-preset",
|
||||
"tags": ["create-your-own-plugin"]
|
||||
},
|
||||
"/plugins/recipes/project-graph-plugins": {
|
||||
"/extending-nx/recipes/project-graph-plugins": {
|
||||
"id": "project-graph-plugins",
|
||||
"name": "Modify the Project Graph",
|
||||
"description": "",
|
||||
"file": "shared/recipes/plugins/project-graph-plugins",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/project-graph-plugins",
|
||||
"path": "/extending-nx/recipes/project-graph-plugins",
|
||||
"tags": ["create-your-own-plugin", "explore-graph"]
|
||||
},
|
||||
"/plugins/recipes/project-inference-plugins": {
|
||||
"/extending-nx/recipes/project-inference-plugins": {
|
||||
"id": "project-inference-plugins",
|
||||
"name": "Identify Custom Projects",
|
||||
"description": "",
|
||||
"file": "shared/recipes/plugins/project-inference-plugins",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/plugins/recipes/project-inference-plugins",
|
||||
"path": "/extending-nx/recipes/project-inference-plugins",
|
||||
"tags": ["create-your-own-plugin"]
|
||||
}
|
||||
}
|
||||
+2772
-1700
File diff suppressed because it is too large
Load Diff
+3330
-254
File diff suppressed because it is too large
Load Diff
@@ -58,6 +58,15 @@
|
||||
"path": "/packages/angular/executors/package",
|
||||
"type": "executor"
|
||||
},
|
||||
"/packages/angular/executors/browser-esbuild": {
|
||||
"description": "Builds your application with esbuild and adds support for incremental builds.",
|
||||
"file": "generated/packages/angular/executors/browser-esbuild.json",
|
||||
"hidden": false,
|
||||
"name": "browser-esbuild",
|
||||
"originalFilePath": "/packages/angular/src/executors/browser-esbuild/schema.json",
|
||||
"path": "/packages/angular/executors/browser-esbuild",
|
||||
"type": "executor"
|
||||
},
|
||||
"/packages/angular/executors/webpack-browser": {
|
||||
"description": "The `webpack-browser` executor is very similar to the standard `browser` builder provided by the Angular Devkit. It allows you to build your Angular application to a build artifact that can be hosted online. There are some key differences: \n- Supports Custom Webpack Configurations \n- Supports Incremental Building",
|
||||
"file": "generated/packages/angular/executors/webpack-browser.json",
|
||||
@@ -483,22 +492,22 @@
|
||||
"path": "/packages/cypress/generators/cypress-project",
|
||||
"type": "generator"
|
||||
},
|
||||
"/packages/cypress/generators/cypress-e2e-configuration": {
|
||||
"/packages/cypress/generators/configuration": {
|
||||
"description": "Add a Cypress E2E Configuration to an existing project.",
|
||||
"file": "generated/packages/cypress/generators/cypress-e2e-configuration.json",
|
||||
"file": "generated/packages/cypress/generators/configuration.json",
|
||||
"hidden": false,
|
||||
"name": "cypress-e2e-configuration",
|
||||
"originalFilePath": "/packages/cypress/src/generators/cypress-e2e-configuration/schema.json",
|
||||
"path": "/packages/cypress/generators/cypress-e2e-configuration",
|
||||
"name": "configuration",
|
||||
"originalFilePath": "/packages/cypress/src/generators/configuration/schema.json",
|
||||
"path": "/packages/cypress/generators/configuration",
|
||||
"type": "generator"
|
||||
},
|
||||
"/packages/cypress/generators/cypress-component-configuration": {
|
||||
"/packages/cypress/generators/component-configuration": {
|
||||
"description": "Set up Cypress Component Test for a project",
|
||||
"file": "generated/packages/cypress/generators/cypress-component-configuration.json",
|
||||
"file": "generated/packages/cypress/generators/component-configuration.json",
|
||||
"hidden": true,
|
||||
"name": "cypress-component-configuration",
|
||||
"originalFilePath": "/packages/cypress/src/generators/cypress-component-configuration/schema.json",
|
||||
"path": "/packages/cypress/generators/cypress-component-configuration",
|
||||
"name": "component-configuration",
|
||||
"originalFilePath": "/packages/cypress/src/generators/component-configuration/schema.json",
|
||||
"path": "/packages/cypress/generators/component-configuration",
|
||||
"type": "generator"
|
||||
},
|
||||
"/packages/cypress/generators/migrate-to-cypress-11": {
|
||||
@@ -651,13 +660,13 @@
|
||||
"path": "/packages/esbuild/generators/init",
|
||||
"type": "generator"
|
||||
},
|
||||
"/packages/esbuild/generators/esbuild-project": {
|
||||
"/packages/esbuild/generators/configuration": {
|
||||
"description": "Add esbuild configuration to a project.",
|
||||
"file": "generated/packages/esbuild/generators/esbuild-project.json",
|
||||
"file": "generated/packages/esbuild/generators/configuration.json",
|
||||
"hidden": true,
|
||||
"name": "esbuild-project",
|
||||
"originalFilePath": "/packages/esbuild/src/generators/esbuild-project/schema.json",
|
||||
"path": "/packages/esbuild/generators/esbuild-project",
|
||||
"name": "configuration",
|
||||
"originalFilePath": "/packages/esbuild/src/generators/configuration/schema.json",
|
||||
"path": "/packages/esbuild/generators/configuration",
|
||||
"type": "generator"
|
||||
}
|
||||
},
|
||||
@@ -690,6 +699,17 @@
|
||||
"path": "/packages/eslint-plugin/documents/enforce-module-boundaries",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/packages/linter/enforce-module-boundaries"
|
||||
},
|
||||
"/packages/eslint-plugin/documents/dependency-checks": {
|
||||
"id": "dependency-checks",
|
||||
"name": "The `dependency-checks` rule",
|
||||
"description": "The eslint-plugin package is an ESLint plugin that contains a collection of recommended ESLint rule configurations which you can extend from in your own ESLint configs, as well as an Nx-specific lint rule called enforce-module-boundaries.",
|
||||
"file": "generated/packages/eslint-plugin/documents/dependency-checks",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/packages/eslint-plugin/documents/dependency-checks",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/packages/linter/dependency-checks"
|
||||
}
|
||||
},
|
||||
"root": "/packages/eslint-plugin",
|
||||
@@ -952,13 +972,13 @@
|
||||
"path": "/packages/jest/generators/init",
|
||||
"type": "generator"
|
||||
},
|
||||
"/packages/jest/generators/jest-project": {
|
||||
"/packages/jest/generators/configuration": {
|
||||
"description": "Add Jest configuration to a project.",
|
||||
"file": "generated/packages/jest/generators/jest-project.json",
|
||||
"file": "generated/packages/jest/generators/configuration.json",
|
||||
"hidden": true,
|
||||
"name": "jest-project",
|
||||
"originalFilePath": "/packages/jest/src/generators/jest-project/schema.json",
|
||||
"path": "/packages/jest/generators/jest-project",
|
||||
"name": "configuration",
|
||||
"originalFilePath": "/packages/jest/src/generators/configuration/schema.json",
|
||||
"path": "/packages/jest/generators/configuration",
|
||||
"type": "generator"
|
||||
}
|
||||
},
|
||||
@@ -1632,7 +1652,7 @@
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/packages/nx/documents/format-check",
|
||||
"tags": ["enforce-project-boundaries"],
|
||||
"tags": ["enforce-module-boundaries"],
|
||||
"originalFilePath": "generated/cli/format-check"
|
||||
},
|
||||
"/packages/nx/documents/format-write": {
|
||||
@@ -1643,7 +1663,7 @@
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/packages/nx/documents/format-write",
|
||||
"tags": ["enforce-project-boundaries"],
|
||||
"tags": ["enforce-module-boundaries"],
|
||||
"originalFilePath": "generated/cli/format-write"
|
||||
},
|
||||
"/packages/nx/documents/migrate": {
|
||||
@@ -1687,7 +1707,7 @@
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/packages/nx/documents/workspace-lint",
|
||||
"tags": ["enforce-project-boundaries"],
|
||||
"tags": ["enforce-module-boundaries"],
|
||||
"originalFilePath": "generated/cli/workspace-lint"
|
||||
},
|
||||
"/packages/nx/documents/workspace-generator": {
|
||||
@@ -1813,6 +1833,59 @@
|
||||
"generators": {},
|
||||
"path": "/packages/nx"
|
||||
},
|
||||
"playwright": {
|
||||
"githubRoot": "https://github.com/nrwl/nx/blob/master",
|
||||
"name": "playwright",
|
||||
"packageName": "@nx/playwright",
|
||||
"description": "The Nx Plugin for Playwright contains executors and generators allowing your workspace to use the powerful Playwright integration testing capabilities.",
|
||||
"documents": {
|
||||
"/packages/playwright/documents/overview": {
|
||||
"id": "overview",
|
||||
"name": "Overview",
|
||||
"description": "The Nx Plugin for Playwright contains executors and generators allowing your workspace to use the powerful Playwright integration testing capabilities.",
|
||||
"file": "generated/packages/playwright/documents/overview",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/packages/playwright/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/packages/playwright/playwright-plugin"
|
||||
}
|
||||
},
|
||||
"root": "/packages/playwright",
|
||||
"source": "/packages/playwright/src",
|
||||
"executors": {
|
||||
"/packages/playwright/executors/playwright": {
|
||||
"description": "Run Playwright tests.",
|
||||
"file": "generated/packages/playwright/executors/playwright.json",
|
||||
"hidden": false,
|
||||
"name": "playwright",
|
||||
"originalFilePath": "/packages/playwright/src/executors/playwright/schema.json",
|
||||
"path": "/packages/playwright/executors/playwright",
|
||||
"type": "executor"
|
||||
}
|
||||
},
|
||||
"generators": {
|
||||
"/packages/playwright/generators/configuration": {
|
||||
"description": "Add Nx Playwright configuration to your project",
|
||||
"file": "generated/packages/playwright/generators/configuration.json",
|
||||
"hidden": false,
|
||||
"name": "configuration",
|
||||
"originalFilePath": "/packages/playwright/src/generators/configuration/schema.json",
|
||||
"path": "/packages/playwright/generators/configuration",
|
||||
"type": "generator"
|
||||
},
|
||||
"/packages/playwright/generators/init": {
|
||||
"description": "Initializes a Playwright project in the current workspace",
|
||||
"file": "generated/packages/playwright/generators/init.json",
|
||||
"hidden": false,
|
||||
"name": "init",
|
||||
"originalFilePath": "/packages/playwright/src/generators/init/schema.json",
|
||||
"path": "/packages/playwright/generators/init",
|
||||
"type": "generator"
|
||||
}
|
||||
},
|
||||
"path": "/packages/playwright"
|
||||
},
|
||||
"plugin": {
|
||||
"githubRoot": "https://github.com/nrwl/nx/blob/master",
|
||||
"name": "plugin",
|
||||
@@ -2325,13 +2398,13 @@
|
||||
"path": "/packages/rollup/generators/init",
|
||||
"type": "generator"
|
||||
},
|
||||
"/packages/rollup/generators/rollup-project": {
|
||||
"/packages/rollup/generators/configuration": {
|
||||
"description": "Add rollup configuration to a project.",
|
||||
"file": "generated/packages/rollup/generators/rollup-project.json",
|
||||
"file": "generated/packages/rollup/generators/configuration.json",
|
||||
"hidden": true,
|
||||
"name": "rollup-project",
|
||||
"originalFilePath": "/packages/rollup/src/generators/rollup-project/schema.json",
|
||||
"path": "/packages/rollup/generators/rollup-project",
|
||||
"name": "configuration",
|
||||
"originalFilePath": "/packages/rollup/src/generators/configuration/schema.json",
|
||||
"path": "/packages/rollup/generators/configuration",
|
||||
"type": "generator"
|
||||
}
|
||||
},
|
||||
@@ -2420,6 +2493,17 @@
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/packages/storybook/custom-builder-configs"
|
||||
},
|
||||
"/packages/storybook/documents/storybook-interaction-tests": {
|
||||
"id": "storybook-interaction-tests",
|
||||
"name": "Setting up Storybook Interaction Tests with Nx",
|
||||
"description": "This guide explains how you can set up Storybook interaction tests on your Nx workspace.",
|
||||
"file": "generated/packages/storybook/documents/storybook-interaction-tests",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/packages/storybook/documents/storybook-interaction-tests",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/packages/storybook/interaction-tests"
|
||||
},
|
||||
"/packages/storybook/documents/storybook-composition-setup": {
|
||||
"id": "storybook-composition-setup",
|
||||
"name": "Setting up Storybook Composition with Nx",
|
||||
@@ -2771,13 +2855,13 @@
|
||||
"path": "/packages/webpack/generators/init",
|
||||
"type": "generator"
|
||||
},
|
||||
"/packages/webpack/generators/webpack-project": {
|
||||
"/packages/webpack/generators/configuration": {
|
||||
"description": "Add webpack configuration to a project.",
|
||||
"file": "generated/packages/webpack/generators/webpack-project.json",
|
||||
"file": "generated/packages/webpack/generators/configuration.json",
|
||||
"hidden": true,
|
||||
"name": "webpack-project",
|
||||
"originalFilePath": "/packages/webpack/src/generators/webpack-project/schema.json",
|
||||
"path": "/packages/webpack/generators/webpack-project",
|
||||
"name": "configuration",
|
||||
"originalFilePath": "/packages/webpack/src/generators/configuration/schema.json",
|
||||
"path": "/packages/webpack/generators/configuration",
|
||||
"type": "generator"
|
||||
}
|
||||
},
|
||||
@@ -2853,6 +2937,15 @@
|
||||
"path": "/packages/workspace/generators/remove",
|
||||
"type": "generator"
|
||||
},
|
||||
"/packages/workspace/generators/convert-to-monorepo": {
|
||||
"description": "Convert a Nx project to a monorepo.",
|
||||
"file": "generated/packages/workspace/generators/convert-to-monorepo.json",
|
||||
"hidden": false,
|
||||
"name": "convert-to-monorepo",
|
||||
"originalFilePath": "/packages/workspace/src/generators/convert-to-monorepo/schema.json",
|
||||
"path": "/packages/workspace/generators/convert-to-monorepo",
|
||||
"type": "generator"
|
||||
},
|
||||
"/packages/workspace/generators/new": {
|
||||
"description": "Create a workspace.",
|
||||
"file": "generated/packages/workspace/generators/new.json",
|
||||
|
||||
@@ -634,6 +634,37 @@
|
||||
"path": "/recipes/adopting-nx-angular/angular-multiple",
|
||||
"tags": []
|
||||
},
|
||||
"/recipes/add-stack": {
|
||||
"id": "add-stack",
|
||||
"name": "Add a New Project",
|
||||
"description": "Instructions to add a project from a new stack to an Nx workspace",
|
||||
"file": "",
|
||||
"itemList": [
|
||||
{
|
||||
"id": "add-qwik",
|
||||
"name": "Add a Qwik Project",
|
||||
"description": "Add a Qwik project to your repo",
|
||||
"file": "shared/recipes/add-stack/add-qwik",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/add-stack/add-qwik",
|
||||
"tags": []
|
||||
}
|
||||
],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/add-stack",
|
||||
"tags": []
|
||||
},
|
||||
"/recipes/add-stack/add-qwik": {
|
||||
"id": "add-qwik",
|
||||
"name": "Add a Qwik Project",
|
||||
"description": "Add a Qwik project to your repo",
|
||||
"file": "shared/recipes/add-stack/add-qwik",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/add-stack/add-qwik",
|
||||
"tags": []
|
||||
},
|
||||
"/recipes/executors": {
|
||||
"id": "executors",
|
||||
"name": "Executors",
|
||||
@@ -1342,10 +1373,10 @@
|
||||
"path": "/recipes/example-repos/dte",
|
||||
"tags": []
|
||||
},
|
||||
"/recipes/other": {
|
||||
"id": "other",
|
||||
"name": "Other",
|
||||
"description": "Other recipes you will find useful.",
|
||||
"/recipes/managing-repository": {
|
||||
"id": "managing-repository",
|
||||
"name": "Managing Your Nx Repository",
|
||||
"description": "Configuring the Repository Itself",
|
||||
"file": "",
|
||||
"itemList": [
|
||||
{
|
||||
@@ -1355,7 +1386,7 @@
|
||||
"file": "shared/recipes/root-level-scripts",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/other/root-level-scripts",
|
||||
"path": "/recipes/managing-repository/root-level-scripts",
|
||||
"tags": ["run-tasks"]
|
||||
},
|
||||
{
|
||||
@@ -1365,7 +1396,7 @@
|
||||
"file": "shared/recipes/analyze-source-files",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/other/analyze-source-files",
|
||||
"path": "/recipes/managing-repository/analyze-source-files",
|
||||
"tags": ["explore-graph"]
|
||||
},
|
||||
{
|
||||
@@ -1375,7 +1406,7 @@
|
||||
"file": "shared/recipes/workspace-watching",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/other/workspace-watching",
|
||||
"path": "/recipes/managing-repository/workspace-watching",
|
||||
"tags": ["workspace-watching"]
|
||||
},
|
||||
{
|
||||
@@ -1385,9 +1416,19 @@
|
||||
"file": "shared/recipes/advanced-update",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/other/advanced-update",
|
||||
"path": "/recipes/managing-repository/advanced-update",
|
||||
"tags": ["automate-updating-dependencies"]
|
||||
},
|
||||
{
|
||||
"id": "standalone-to-integrated",
|
||||
"name": "Convert from a Standalone Repository to an Integrated Repository",
|
||||
"description": "",
|
||||
"file": "shared/recipes/repo-types/standalone-to-integrated",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/managing-repository/standalone-to-integrated",
|
||||
"tags": ["repository-types"]
|
||||
},
|
||||
{
|
||||
"id": "js-and-ts",
|
||||
"name": "JavaScript and TypeScript",
|
||||
@@ -1395,9 +1436,80 @@
|
||||
"file": "shared/guides/js-and-ts",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/other/js-and-ts",
|
||||
"path": "/recipes/managing-repository/js-and-ts",
|
||||
"tags": []
|
||||
},
|
||||
}
|
||||
],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/managing-repository",
|
||||
"tags": []
|
||||
},
|
||||
"/recipes/managing-repository/root-level-scripts": {
|
||||
"id": "root-level-scripts",
|
||||
"name": "Run Root-Level NPM Scripts with Nx",
|
||||
"description": "",
|
||||
"file": "shared/recipes/root-level-scripts",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/managing-repository/root-level-scripts",
|
||||
"tags": ["run-tasks"]
|
||||
},
|
||||
"/recipes/managing-repository/analyze-source-files": {
|
||||
"id": "analyze-source-files",
|
||||
"name": "Disable Graph Links Created from Analyzing Source Files",
|
||||
"description": "",
|
||||
"file": "shared/recipes/analyze-source-files",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/managing-repository/analyze-source-files",
|
||||
"tags": ["explore-graph"]
|
||||
},
|
||||
"/recipes/managing-repository/workspace-watching": {
|
||||
"id": "workspace-watching",
|
||||
"name": "Workspace Watching",
|
||||
"description": "",
|
||||
"file": "shared/recipes/workspace-watching",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/managing-repository/workspace-watching",
|
||||
"tags": ["workspace-watching"]
|
||||
},
|
||||
"/recipes/managing-repository/advanced-update": {
|
||||
"id": "advanced-update",
|
||||
"name": "Advanced Update Process",
|
||||
"description": "",
|
||||
"file": "shared/recipes/advanced-update",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/managing-repository/advanced-update",
|
||||
"tags": ["automate-updating-dependencies"]
|
||||
},
|
||||
"/recipes/managing-repository/standalone-to-integrated": {
|
||||
"id": "standalone-to-integrated",
|
||||
"name": "Convert from a Standalone Repository to an Integrated Repository",
|
||||
"description": "",
|
||||
"file": "shared/recipes/repo-types/standalone-to-integrated",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/managing-repository/standalone-to-integrated",
|
||||
"tags": ["repository-types"]
|
||||
},
|
||||
"/recipes/managing-repository/js-and-ts": {
|
||||
"id": "js-and-ts",
|
||||
"name": "JavaScript and TypeScript",
|
||||
"description": "",
|
||||
"file": "shared/guides/js-and-ts",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/managing-repository/js-and-ts",
|
||||
"tags": []
|
||||
},
|
||||
"/recipes/other": {
|
||||
"id": "other",
|
||||
"name": "Other",
|
||||
"description": "Other recipes you will find useful.",
|
||||
"file": "",
|
||||
"itemList": [
|
||||
{
|
||||
"id": "react-native",
|
||||
"name": "React Native with Nx",
|
||||
@@ -1597,62 +1709,22 @@
|
||||
"isExternal": false,
|
||||
"path": "/recipes/other/standalone-ngrx-apis",
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"id": "unknown-local-cache",
|
||||
"name": "Unknown Local Cache Error",
|
||||
"description": "",
|
||||
"file": "shared/guides/unknown-local-cache",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/other/unknown-local-cache",
|
||||
"tags": []
|
||||
}
|
||||
],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/other",
|
||||
"tags": []
|
||||
},
|
||||
"/recipes/other/root-level-scripts": {
|
||||
"id": "root-level-scripts",
|
||||
"name": "Run Root-Level NPM Scripts with Nx",
|
||||
"description": "",
|
||||
"file": "shared/recipes/root-level-scripts",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/other/root-level-scripts",
|
||||
"tags": ["run-tasks"]
|
||||
},
|
||||
"/recipes/other/analyze-source-files": {
|
||||
"id": "analyze-source-files",
|
||||
"name": "Disable Graph Links Created from Analyzing Source Files",
|
||||
"description": "",
|
||||
"file": "shared/recipes/analyze-source-files",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/other/analyze-source-files",
|
||||
"tags": ["explore-graph"]
|
||||
},
|
||||
"/recipes/other/workspace-watching": {
|
||||
"id": "workspace-watching",
|
||||
"name": "Workspace Watching",
|
||||
"description": "",
|
||||
"file": "shared/recipes/workspace-watching",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/other/workspace-watching",
|
||||
"tags": ["workspace-watching"]
|
||||
},
|
||||
"/recipes/other/advanced-update": {
|
||||
"id": "advanced-update",
|
||||
"name": "Advanced Update Process",
|
||||
"description": "",
|
||||
"file": "shared/recipes/advanced-update",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/other/advanced-update",
|
||||
"tags": ["automate-updating-dependencies"]
|
||||
},
|
||||
"/recipes/other/js-and-ts": {
|
||||
"id": "js-and-ts",
|
||||
"name": "JavaScript and TypeScript",
|
||||
"description": "",
|
||||
"file": "shared/guides/js-and-ts",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/other/js-and-ts",
|
||||
"tags": []
|
||||
},
|
||||
"/recipes/other/react-native": {
|
||||
"id": "react-native",
|
||||
"name": "React Native with Nx",
|
||||
@@ -1852,5 +1924,15 @@
|
||||
"isExternal": false,
|
||||
"path": "/recipes/other/standalone-ngrx-apis",
|
||||
"tags": []
|
||||
},
|
||||
"/recipes/other/unknown-local-cache": {
|
||||
"id": "unknown-local-cache",
|
||||
"name": "Unknown Local Cache Error",
|
||||
"description": "",
|
||||
"file": "shared/guides/unknown-local-cache",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/other/unknown-local-cache",
|
||||
"tags": []
|
||||
}
|
||||
}
|
||||
|
||||
+502
-468
File diff suppressed because it is too large
Load Diff
@@ -53,6 +53,15 @@
|
||||
"path": "angular/executors/package",
|
||||
"type": "executor"
|
||||
},
|
||||
{
|
||||
"description": "Builds your application with esbuild and adds support for incremental builds.",
|
||||
"file": "generated/packages/angular/executors/browser-esbuild.json",
|
||||
"hidden": false,
|
||||
"name": "browser-esbuild",
|
||||
"originalFilePath": "/packages/angular/src/executors/browser-esbuild/schema.json",
|
||||
"path": "angular/executors/browser-esbuild",
|
||||
"type": "executor"
|
||||
},
|
||||
{
|
||||
"description": "The `webpack-browser` executor is very similar to the standard `browser` builder provided by the Angular Devkit. It allows you to build your Angular application to a build artifact that can be hosted online. There are some key differences: \n- Supports Custom Webpack Configurations \n- Supports Incremental Building",
|
||||
"file": "generated/packages/angular/executors/webpack-browser.json",
|
||||
@@ -477,20 +486,20 @@
|
||||
},
|
||||
{
|
||||
"description": "Add a Cypress E2E Configuration to an existing project.",
|
||||
"file": "generated/packages/cypress/generators/cypress-e2e-configuration.json",
|
||||
"file": "generated/packages/cypress/generators/configuration.json",
|
||||
"hidden": false,
|
||||
"name": "cypress-e2e-configuration",
|
||||
"originalFilePath": "/packages/cypress/src/generators/cypress-e2e-configuration/schema.json",
|
||||
"path": "cypress/generators/cypress-e2e-configuration",
|
||||
"name": "configuration",
|
||||
"originalFilePath": "/packages/cypress/src/generators/configuration/schema.json",
|
||||
"path": "cypress/generators/configuration",
|
||||
"type": "generator"
|
||||
},
|
||||
{
|
||||
"description": "Set up Cypress Component Test for a project",
|
||||
"file": "generated/packages/cypress/generators/cypress-component-configuration.json",
|
||||
"file": "generated/packages/cypress/generators/component-configuration.json",
|
||||
"hidden": true,
|
||||
"name": "cypress-component-configuration",
|
||||
"originalFilePath": "/packages/cypress/src/generators/cypress-component-configuration/schema.json",
|
||||
"path": "cypress/generators/cypress-component-configuration",
|
||||
"name": "component-configuration",
|
||||
"originalFilePath": "/packages/cypress/src/generators/component-configuration/schema.json",
|
||||
"path": "cypress/generators/component-configuration",
|
||||
"type": "generator"
|
||||
},
|
||||
{
|
||||
@@ -642,11 +651,11 @@
|
||||
},
|
||||
{
|
||||
"description": "Add esbuild configuration to a project.",
|
||||
"file": "generated/packages/esbuild/generators/esbuild-project.json",
|
||||
"file": "generated/packages/esbuild/generators/configuration.json",
|
||||
"hidden": true,
|
||||
"name": "esbuild-project",
|
||||
"originalFilePath": "/packages/esbuild/src/generators/esbuild-project/schema.json",
|
||||
"path": "esbuild/generators/esbuild-project",
|
||||
"name": "configuration",
|
||||
"originalFilePath": "/packages/esbuild/src/generators/configuration/schema.json",
|
||||
"path": "esbuild/generators/configuration",
|
||||
"type": "generator"
|
||||
}
|
||||
],
|
||||
@@ -680,6 +689,17 @@
|
||||
"path": "eslint-plugin/documents/enforce-module-boundaries",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/packages/linter/enforce-module-boundaries"
|
||||
},
|
||||
{
|
||||
"id": "dependency-checks",
|
||||
"name": "The `dependency-checks` rule",
|
||||
"description": "The eslint-plugin package is an ESLint plugin that contains a collection of recommended ESLint rule configurations which you can extend from in your own ESLint configs, as well as an Nx-specific lint rule called enforce-module-boundaries.",
|
||||
"file": "generated/packages/eslint-plugin/documents/dependency-checks",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "eslint-plugin/documents/dependency-checks",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/packages/linter/dependency-checks"
|
||||
}
|
||||
],
|
||||
"executors": [],
|
||||
@@ -939,11 +959,11 @@
|
||||
},
|
||||
{
|
||||
"description": "Add Jest configuration to a project.",
|
||||
"file": "generated/packages/jest/generators/jest-project.json",
|
||||
"file": "generated/packages/jest/generators/configuration.json",
|
||||
"hidden": true,
|
||||
"name": "jest-project",
|
||||
"originalFilePath": "/packages/jest/src/generators/jest-project/schema.json",
|
||||
"path": "jest/generators/jest-project",
|
||||
"name": "configuration",
|
||||
"originalFilePath": "/packages/jest/src/generators/configuration/schema.json",
|
||||
"path": "jest/generators/configuration",
|
||||
"type": "generator"
|
||||
}
|
||||
],
|
||||
@@ -1613,7 +1633,7 @@
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "nx/documents/format-check",
|
||||
"tags": ["enforce-project-boundaries"],
|
||||
"tags": ["enforce-module-boundaries"],
|
||||
"originalFilePath": "generated/cli/format-check"
|
||||
},
|
||||
{
|
||||
@@ -1624,7 +1644,7 @@
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "nx/documents/format-write",
|
||||
"tags": ["enforce-project-boundaries"],
|
||||
"tags": ["enforce-module-boundaries"],
|
||||
"originalFilePath": "generated/cli/format-write"
|
||||
},
|
||||
{
|
||||
@@ -1668,7 +1688,7 @@
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "nx/documents/workspace-lint",
|
||||
"tags": ["enforce-project-boundaries"],
|
||||
"tags": ["enforce-module-boundaries"],
|
||||
"originalFilePath": "generated/cli/workspace-lint"
|
||||
},
|
||||
{
|
||||
@@ -1796,6 +1816,58 @@
|
||||
"root": "/packages/nx",
|
||||
"source": "/packages/nx/src"
|
||||
},
|
||||
{
|
||||
"description": "The Nx Plugin for Playwright contains executors and generators allowing your workspace to use the powerful Playwright integration testing capabilities.",
|
||||
"documents": [
|
||||
{
|
||||
"id": "overview",
|
||||
"name": "Overview",
|
||||
"description": "The Nx Plugin for Playwright contains executors and generators allowing your workspace to use the powerful Playwright integration testing capabilities.",
|
||||
"file": "generated/packages/playwright/documents/overview",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "playwright/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/packages/playwright/playwright-plugin"
|
||||
}
|
||||
],
|
||||
"executors": [
|
||||
{
|
||||
"description": "Run Playwright tests.",
|
||||
"file": "generated/packages/playwright/executors/playwright.json",
|
||||
"hidden": false,
|
||||
"name": "playwright",
|
||||
"originalFilePath": "/packages/playwright/src/executors/playwright/schema.json",
|
||||
"path": "playwright/executors/playwright",
|
||||
"type": "executor"
|
||||
}
|
||||
],
|
||||
"generators": [
|
||||
{
|
||||
"description": "Add Nx Playwright configuration to your project",
|
||||
"file": "generated/packages/playwright/generators/configuration.json",
|
||||
"hidden": false,
|
||||
"name": "configuration",
|
||||
"originalFilePath": "/packages/playwright/src/generators/configuration/schema.json",
|
||||
"path": "playwright/generators/configuration",
|
||||
"type": "generator"
|
||||
},
|
||||
{
|
||||
"description": "Initializes a Playwright project in the current workspace",
|
||||
"file": "generated/packages/playwright/generators/init.json",
|
||||
"hidden": false,
|
||||
"name": "init",
|
||||
"originalFilePath": "/packages/playwright/src/generators/init/schema.json",
|
||||
"path": "playwright/generators/init",
|
||||
"type": "generator"
|
||||
}
|
||||
],
|
||||
"githubRoot": "https://github.com/nrwl/nx/blob/master",
|
||||
"name": "playwright",
|
||||
"packageName": "@nx/playwright",
|
||||
"root": "/packages/playwright",
|
||||
"source": "/packages/playwright/src"
|
||||
},
|
||||
{
|
||||
"description": "This plugin is used to create Nx plugins! It contains generators for generating common plugin features like generators, executors, migrations and more.",
|
||||
"documents": [
|
||||
@@ -2302,11 +2374,11 @@
|
||||
},
|
||||
{
|
||||
"description": "Add rollup configuration to a project.",
|
||||
"file": "generated/packages/rollup/generators/rollup-project.json",
|
||||
"file": "generated/packages/rollup/generators/configuration.json",
|
||||
"hidden": true,
|
||||
"name": "rollup-project",
|
||||
"originalFilePath": "/packages/rollup/src/generators/rollup-project/schema.json",
|
||||
"path": "rollup/generators/rollup-project",
|
||||
"name": "configuration",
|
||||
"originalFilePath": "/packages/rollup/src/generators/configuration/schema.json",
|
||||
"path": "rollup/generators/configuration",
|
||||
"type": "generator"
|
||||
}
|
||||
],
|
||||
@@ -2396,6 +2468,17 @@
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/packages/storybook/custom-builder-configs"
|
||||
},
|
||||
{
|
||||
"id": "storybook-interaction-tests",
|
||||
"name": "Setting up Storybook Interaction Tests with Nx",
|
||||
"description": "This guide explains how you can set up Storybook interaction tests on your Nx workspace.",
|
||||
"file": "generated/packages/storybook/documents/storybook-interaction-tests",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "storybook/documents/storybook-interaction-tests",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/packages/storybook/interaction-tests"
|
||||
},
|
||||
{
|
||||
"id": "storybook-composition-setup",
|
||||
"name": "Setting up Storybook Composition with Nx",
|
||||
@@ -2743,11 +2826,11 @@
|
||||
},
|
||||
{
|
||||
"description": "Add webpack configuration to a project.",
|
||||
"file": "generated/packages/webpack/generators/webpack-project.json",
|
||||
"file": "generated/packages/webpack/generators/configuration.json",
|
||||
"hidden": true,
|
||||
"name": "webpack-project",
|
||||
"originalFilePath": "/packages/webpack/src/generators/webpack-project/schema.json",
|
||||
"path": "webpack/generators/webpack-project",
|
||||
"name": "configuration",
|
||||
"originalFilePath": "/packages/webpack/src/generators/configuration/schema.json",
|
||||
"path": "webpack/generators/configuration",
|
||||
"type": "generator"
|
||||
}
|
||||
],
|
||||
@@ -2822,6 +2905,15 @@
|
||||
"path": "workspace/generators/remove",
|
||||
"type": "generator"
|
||||
},
|
||||
{
|
||||
"description": "Convert a Nx project to a monorepo.",
|
||||
"file": "generated/packages/workspace/generators/convert-to-monorepo.json",
|
||||
"hidden": false,
|
||||
"name": "convert-to-monorepo",
|
||||
"originalFilePath": "/packages/workspace/src/generators/convert-to-monorepo/schema.json",
|
||||
"path": "workspace/generators/convert-to-monorepo",
|
||||
"type": "generator"
|
||||
},
|
||||
{
|
||||
"description": "Create a workspace.",
|
||||
"file": "generated/packages/workspace/generators/new.json",
|
||||
|
||||
@@ -14,6 +14,7 @@ We provide a recommended version, and it is usually the latest minor version of
|
||||
|
||||
| Angular Version | **Nx Version _(recommended)_** | Nx Version _(range)_ |
|
||||
| --------------- | ------------------------------ | --------------------------------------- |
|
||||
| ~16.1.0 | **latest** | 16.4.0 <= latest |
|
||||
| ~16.0.0 | **latest** | 16.1.0 <= latest |
|
||||
| ~15.2.0 | **latest** | 15.8.0 <= latest |
|
||||
| ~15.1.0 | **latest** | 15.5.0 <= latest |
|
||||
|
||||
@@ -12,7 +12,7 @@ within an Nx workspace. It provides:
|
||||
|
||||
{% callout type="note" title="Currently using the Angular CLI?" %}
|
||||
You can easily and mostly **automatically migrate from an Angular CLI** project to Nx! Learn
|
||||
more [here](/recipes/adopting-nx/migration-angular).
|
||||
more [here](/recipes/angular/migration/angular).
|
||||
{% /callout %}
|
||||
|
||||
## Setting up the Angular plugin
|
||||
@@ -75,9 +75,9 @@ nx lint libName
|
||||
|
||||
Read more about:
|
||||
|
||||
- [Creating Libraries](/more-concepts/creating-libraries)
|
||||
- [Library Types](/more-concepts/library-types)
|
||||
- [Buildable and Publishable Libraries](/more-concepts/buildable-and-publishable-libraries)
|
||||
- [Creating Libraries](/concepts/more-concepts/creating-libraries)
|
||||
- [Library Types](/concepts/more-concepts/library-types)
|
||||
- [Buildable and Publishable Libraries](/concepts/more-concepts/buildable-and-publishable-libraries)
|
||||
|
||||
### Fallback to `@schematics/angular`
|
||||
|
||||
@@ -92,9 +92,7 @@ nx g @nx/angular:service my-service
|
||||
## More Documentation
|
||||
|
||||
- [Angular Nx Tutorial](/angular-tutorial/1-code-generation)
|
||||
- [Migrating from the Angular CLI](/recipes/adopting-nx/migration-angular)
|
||||
- [Setup Module Federation with Angular and Nx](/recipes/module-federation/faster-builds)
|
||||
- [Using NgRx](/recipes/other/misc-ngrx)
|
||||
- [Using Data Persistence operators](/recipes/other/misc-data-persistence)
|
||||
- [Upgrading an AngularJS application to Angular](/recipes/adopting-nx/migration-angularjs)
|
||||
- [Using Tailwind CSS with Angular projects](/recipes/other/using-tailwind-css-with-angular-projects)
|
||||
- [Migrating from the Angular CLI](/recipes/angular/migration/angular)
|
||||
- [Setup Module Federation with Angular and Nx](/concepts/more-concepts/faster-builds-with-module-federation)
|
||||
- [Upgrading an AngularJS application to Angular](/recipes/angular/migration/angularjs)
|
||||
- [Using Tailwind CSS with Angular projects](/recipes/angular/using-tailwind-css-with-angular-projects)
|
||||
|
||||
@@ -0,0 +1,626 @@
|
||||
{
|
||||
"name": "browser-esbuild",
|
||||
"implementation": "/packages/angular/src/executors/browser-esbuild/browser-esbuild.impl.ts",
|
||||
"schema": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"title": "Schema for Nx ESBuild Executor",
|
||||
"description": "Nx ESBuild Executor supporting Incremental Builds.",
|
||||
"outputCapture": "direct-nodejs",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"assets": {
|
||||
"type": "array",
|
||||
"description": "List of static application assets.",
|
||||
"default": [],
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"followSymlinks": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Allow glob patterns to follow symlink directories. This allows subdirectories of the symlink to be searched."
|
||||
},
|
||||
"glob": {
|
||||
"type": "string",
|
||||
"description": "The pattern to match."
|
||||
},
|
||||
"input": {
|
||||
"type": "string",
|
||||
"description": "The input directory path in which to apply 'glob'. Defaults to the project root."
|
||||
},
|
||||
"ignore": {
|
||||
"description": "An array of globs to ignore.",
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"output": {
|
||||
"type": "string",
|
||||
"description": "Absolute path within the output."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["glob", "input", "output"]
|
||||
},
|
||||
{ "type": "string" }
|
||||
]
|
||||
}
|
||||
},
|
||||
"main": {
|
||||
"type": "string",
|
||||
"description": "The full path for the main entry point to the app, relative to the current workspace."
|
||||
},
|
||||
"polyfills": {
|
||||
"description": "Polyfills to be included in the build.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "array",
|
||||
"description": "A list of polyfills to include in the build. Can be a full path for a file, relative to the current workspace or module specifier. Example: 'zone.js'.",
|
||||
"items": { "type": "string", "uniqueItems": true },
|
||||
"default": []
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "The full path for the polyfills file, relative to the current workspace or a module specifier. Example: 'zone.js'."
|
||||
}
|
||||
]
|
||||
},
|
||||
"tsConfig": {
|
||||
"type": "string",
|
||||
"description": "The full path for the TypeScript configuration file, relative to the current workspace."
|
||||
},
|
||||
"scripts": {
|
||||
"description": "Global scripts to be included in the build.",
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"input": {
|
||||
"type": "string",
|
||||
"description": "The file to include.",
|
||||
"pattern": "\\.[cm]?jsx?$"
|
||||
},
|
||||
"bundleName": {
|
||||
"type": "string",
|
||||
"pattern": "^[\\w\\-.]*$",
|
||||
"description": "The bundle name for this extra entry point."
|
||||
},
|
||||
"inject": {
|
||||
"type": "boolean",
|
||||
"description": "If the bundle will be referenced in the HTML file.",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["input"]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "The JavaScript/TypeScript file or package containing the file to include."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"styles": {
|
||||
"description": "Global styles to be included in the build.",
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"input": {
|
||||
"type": "string",
|
||||
"description": "The file to include.",
|
||||
"pattern": "\\.(?:css|scss|sass|less)$"
|
||||
},
|
||||
"bundleName": {
|
||||
"type": "string",
|
||||
"pattern": "^[\\w\\-.]*$",
|
||||
"description": "The bundle name for this extra entry point."
|
||||
},
|
||||
"inject": {
|
||||
"type": "boolean",
|
||||
"description": "If the bundle will be referenced in the HTML file.",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["input"]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "The file to include.",
|
||||
"pattern": "\\.(?:css|scss|sass|less)$"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"inlineStyleLanguage": {
|
||||
"description": "The stylesheet language to use for the application's inline component styles.",
|
||||
"type": "string",
|
||||
"default": "css",
|
||||
"enum": ["css", "less", "sass", "scss"]
|
||||
},
|
||||
"stylePreprocessorOptions": {
|
||||
"description": "Options to pass to style preprocessors.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"includePaths": {
|
||||
"description": "Paths to include. Paths will be resolved to workspace root.",
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"default": []
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"externalDependencies": {
|
||||
"description": "Exclude the listed external dependencies from being bundled into the bundle. Instead, the created bundle relies on these dependencies to be available during runtime.",
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"default": []
|
||||
},
|
||||
"optimization": {
|
||||
"description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.io/guide/workspace-config#optimization-configuration.",
|
||||
"default": true,
|
||||
"x-user-analytics": "ep.ng_optimization",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scripts": {
|
||||
"type": "boolean",
|
||||
"description": "Enables optimization of the scripts output.",
|
||||
"default": true
|
||||
},
|
||||
"styles": {
|
||||
"description": "Enables optimization of the styles output.",
|
||||
"default": true,
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"minify": {
|
||||
"type": "boolean",
|
||||
"description": "Minify CSS definitions by removing extraneous whitespace and comments, merging identifiers and minimizing values.",
|
||||
"default": true
|
||||
},
|
||||
"inlineCritical": {
|
||||
"type": "boolean",
|
||||
"description": "Extract and inline critical CSS definitions to improve first paint time.",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
{ "type": "boolean" }
|
||||
]
|
||||
},
|
||||
"fonts": {
|
||||
"description": "Enables optimization for fonts. This option requires internet access. `HTTPS_PROXY` environment variable can be used to specify a proxy server.",
|
||||
"default": true,
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"inline": {
|
||||
"type": "boolean",
|
||||
"description": "Reduce render blocking requests by inlining external Google Fonts and Adobe Fonts CSS definitions in the application's HTML index file. This option requires internet access. `HTTPS_PROXY` environment variable can be used to specify a proxy server.",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
{ "type": "boolean" }
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
{ "type": "boolean" }
|
||||
]
|
||||
},
|
||||
"fileReplacements": {
|
||||
"description": "Replace compilation source files with other compilation source files in the build.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"replace": {
|
||||
"type": "string",
|
||||
"pattern": "\\.(([cm]?j|t)sx?|json)$"
|
||||
},
|
||||
"with": { "type": "string", "pattern": "\\.(([cm]?j|t)sx?|json)$" }
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["replace", "with"]
|
||||
},
|
||||
"default": []
|
||||
},
|
||||
"outputPath": {
|
||||
"type": "string",
|
||||
"description": "The full path for the new output directory, relative to the current workspace.\nBy default, writes output to a folder named dist/ in the current project."
|
||||
},
|
||||
"resourcesOutputPath": {
|
||||
"type": "string",
|
||||
"description": "The path where style resources will be placed, relative to outputPath."
|
||||
},
|
||||
"aot": {
|
||||
"type": "boolean",
|
||||
"description": "Build using Ahead of Time compilation.",
|
||||
"x-user-analytics": "ep.ng_aot",
|
||||
"default": true
|
||||
},
|
||||
"sourceMap": {
|
||||
"description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.",
|
||||
"default": false,
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scripts": {
|
||||
"type": "boolean",
|
||||
"description": "Output source maps for all scripts.",
|
||||
"default": true
|
||||
},
|
||||
"styles": {
|
||||
"type": "boolean",
|
||||
"description": "Output source maps for all styles.",
|
||||
"default": true
|
||||
},
|
||||
"hidden": {
|
||||
"type": "boolean",
|
||||
"description": "Output source maps used for error reporting tools.",
|
||||
"default": false
|
||||
},
|
||||
"vendor": {
|
||||
"type": "boolean",
|
||||
"description": "Resolve vendor packages source maps.",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
{ "type": "boolean" }
|
||||
]
|
||||
},
|
||||
"vendorChunk": {
|
||||
"type": "boolean",
|
||||
"description": "Generate a seperate bundle containing only vendor libraries. This option should only be used for development to reduce the incremental compilation time.",
|
||||
"default": false
|
||||
},
|
||||
"commonChunk": {
|
||||
"type": "boolean",
|
||||
"description": "Generate a seperate bundle containing code used across multiple bundles.",
|
||||
"default": true
|
||||
},
|
||||
"baseHref": {
|
||||
"type": "string",
|
||||
"description": "Base url for the application being built."
|
||||
},
|
||||
"deployUrl": {
|
||||
"type": "string",
|
||||
"description": "URL where files will be deployed.",
|
||||
"x-deprecated": "Use \"baseHref\" option, \"APP_BASE_HREF\" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url."
|
||||
},
|
||||
"verbose": {
|
||||
"type": "boolean",
|
||||
"description": "Adds more details to output logging.",
|
||||
"default": false
|
||||
},
|
||||
"progress": {
|
||||
"type": "boolean",
|
||||
"description": "Log progress to the console while building.",
|
||||
"default": true
|
||||
},
|
||||
"i18nMissingTranslation": {
|
||||
"type": "string",
|
||||
"description": "How to handle missing translations for i18n.",
|
||||
"enum": ["warning", "error", "ignore"],
|
||||
"default": "warning"
|
||||
},
|
||||
"i18nDuplicateTranslation": {
|
||||
"type": "string",
|
||||
"description": "How to handle duplicate translations for i18n.",
|
||||
"enum": ["warning", "error", "ignore"],
|
||||
"default": "warning"
|
||||
},
|
||||
"localize": {
|
||||
"description": "Translate the bundles in one or more locales.",
|
||||
"oneOf": [
|
||||
{ "type": "boolean", "description": "Translate all locales." },
|
||||
{
|
||||
"type": "array",
|
||||
"description": "List of locales ID's to translate.",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-[a-zA-Z]{5,8})?(-x(-[a-zA-Z0-9]{1,8})+)?$"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"watch": {
|
||||
"type": "boolean",
|
||||
"description": "Run build when files change.",
|
||||
"default": false
|
||||
},
|
||||
"outputHashing": {
|
||||
"type": "string",
|
||||
"description": "Define the output filename cache-busting hashing mode.",
|
||||
"default": "none",
|
||||
"enum": ["none", "all", "media", "bundles"]
|
||||
},
|
||||
"poll": {
|
||||
"type": "number",
|
||||
"description": "Enable and define the file watching poll time period in milliseconds."
|
||||
},
|
||||
"deleteOutputPath": {
|
||||
"type": "boolean",
|
||||
"description": "Delete the output path before building.",
|
||||
"default": true
|
||||
},
|
||||
"preserveSymlinks": {
|
||||
"type": "boolean",
|
||||
"description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
|
||||
},
|
||||
"extractLicenses": {
|
||||
"type": "boolean",
|
||||
"description": "Extract all licenses in a separate file.",
|
||||
"default": true
|
||||
},
|
||||
"buildOptimizer": {
|
||||
"type": "boolean",
|
||||
"description": "Enables advanced build optimizations when using the 'aot' option.",
|
||||
"default": true
|
||||
},
|
||||
"namedChunks": {
|
||||
"type": "boolean",
|
||||
"description": "Use file name for lazy loaded chunks.",
|
||||
"default": false
|
||||
},
|
||||
"subresourceIntegrity": {
|
||||
"type": "boolean",
|
||||
"description": "Enables the use of subresource integrity validation.",
|
||||
"default": false
|
||||
},
|
||||
"serviceWorker": {
|
||||
"type": "boolean",
|
||||
"description": "Generates a service worker config for production builds.",
|
||||
"default": false
|
||||
},
|
||||
"ngswConfigPath": {
|
||||
"type": "string",
|
||||
"description": "Path to ngsw-config.json."
|
||||
},
|
||||
"index": {
|
||||
"description": "Configures the generation of the application's HTML index.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "The path of a file to use for the application's HTML index. The filename of the specified path will be used for the generated file and will be created in the root of the application's configured output path."
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"description": "",
|
||||
"properties": {
|
||||
"input": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "The path of a file to use for the application's generated HTML index."
|
||||
},
|
||||
"output": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"default": "index.html",
|
||||
"description": "The output path of the application's generated HTML index file. The full provided path will be used and will be considered relative to the application's configured output path."
|
||||
}
|
||||
},
|
||||
"required": ["input"]
|
||||
},
|
||||
{
|
||||
"const": false,
|
||||
"description": "Does not generate an `index.html` file."
|
||||
}
|
||||
]
|
||||
},
|
||||
"statsJson": {
|
||||
"type": "boolean",
|
||||
"description": "Generates a 'stats.json' file which can be analyzed using tools such as 'webpack-bundle-analyzer'.",
|
||||
"default": false
|
||||
},
|
||||
"budgets": {
|
||||
"description": "Budget thresholds to ensure parts of your application stay within boundaries which you set.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "The type of budget.",
|
||||
"enum": [
|
||||
"all",
|
||||
"allScript",
|
||||
"any",
|
||||
"anyScript",
|
||||
"anyComponentStyle",
|
||||
"bundle",
|
||||
"initial"
|
||||
]
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the bundle."
|
||||
},
|
||||
"baseline": {
|
||||
"type": "string",
|
||||
"description": "The baseline size for comparison."
|
||||
},
|
||||
"maximumWarning": {
|
||||
"type": "string",
|
||||
"description": "The maximum threshold for warning relative to the baseline."
|
||||
},
|
||||
"maximumError": {
|
||||
"type": "string",
|
||||
"description": "The maximum threshold for error relative to the baseline."
|
||||
},
|
||||
"minimumWarning": {
|
||||
"type": "string",
|
||||
"description": "The minimum threshold for warning relative to the baseline."
|
||||
},
|
||||
"minimumError": {
|
||||
"type": "string",
|
||||
"description": "The minimum threshold for error relative to the baseline."
|
||||
},
|
||||
"warning": {
|
||||
"type": "string",
|
||||
"description": "The threshold for warning relative to the baseline (min & max)."
|
||||
},
|
||||
"error": {
|
||||
"type": "string",
|
||||
"description": "The threshold for error relative to the baseline (min & max)."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["type"]
|
||||
},
|
||||
"default": []
|
||||
},
|
||||
"webWorkerTsConfig": {
|
||||
"type": "string",
|
||||
"description": "TypeScript configuration for Web Worker modules."
|
||||
},
|
||||
"crossOrigin": {
|
||||
"type": "string",
|
||||
"description": "Define the crossorigin attribute setting of elements that provide CORS support.",
|
||||
"default": "none",
|
||||
"enum": ["none", "anonymous", "use-credentials"]
|
||||
},
|
||||
"allowedCommonJsDependencies": {
|
||||
"description": "A list of CommonJS packages that are allowed to be used without a build time warning.",
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"default": []
|
||||
},
|
||||
"buildLibsFromSource": {
|
||||
"type": "boolean",
|
||||
"description": "Read buildable libraries from source instead of building them separately.",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["outputPath", "index", "main", "tsConfig"],
|
||||
"definitions": {
|
||||
"assetPattern": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"followSymlinks": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Allow glob patterns to follow symlink directories. This allows subdirectories of the symlink to be searched."
|
||||
},
|
||||
"glob": {
|
||||
"type": "string",
|
||||
"description": "The pattern to match."
|
||||
},
|
||||
"input": {
|
||||
"type": "string",
|
||||
"description": "The input directory path in which to apply 'glob'. Defaults to the project root."
|
||||
},
|
||||
"ignore": {
|
||||
"description": "An array of globs to ignore.",
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"output": {
|
||||
"type": "string",
|
||||
"description": "Absolute path within the output."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["glob", "input", "output"]
|
||||
},
|
||||
{ "type": "string" }
|
||||
]
|
||||
},
|
||||
"fileReplacement": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"replace": {
|
||||
"type": "string",
|
||||
"pattern": "\\.(([cm]?j|t)sx?|json)$"
|
||||
},
|
||||
"with": { "type": "string", "pattern": "\\.(([cm]?j|t)sx?|json)$" }
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["replace", "with"]
|
||||
},
|
||||
"budget": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "The type of budget.",
|
||||
"enum": [
|
||||
"all",
|
||||
"allScript",
|
||||
"any",
|
||||
"anyScript",
|
||||
"anyComponentStyle",
|
||||
"bundle",
|
||||
"initial"
|
||||
]
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the bundle."
|
||||
},
|
||||
"baseline": {
|
||||
"type": "string",
|
||||
"description": "The baseline size for comparison."
|
||||
},
|
||||
"maximumWarning": {
|
||||
"type": "string",
|
||||
"description": "The maximum threshold for warning relative to the baseline."
|
||||
},
|
||||
"maximumError": {
|
||||
"type": "string",
|
||||
"description": "The maximum threshold for error relative to the baseline."
|
||||
},
|
||||
"minimumWarning": {
|
||||
"type": "string",
|
||||
"description": "The minimum threshold for warning relative to the baseline."
|
||||
},
|
||||
"minimumError": {
|
||||
"type": "string",
|
||||
"description": "The minimum threshold for error relative to the baseline."
|
||||
},
|
||||
"warning": {
|
||||
"type": "string",
|
||||
"description": "The threshold for warning relative to the baseline (min & max)."
|
||||
},
|
||||
"error": {
|
||||
"type": "string",
|
||||
"description": "The threshold for error relative to the baseline (min & max)."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["type"]
|
||||
}
|
||||
},
|
||||
"presets": []
|
||||
},
|
||||
"description": "Builds your application with esbuild and adds support for incremental builds.",
|
||||
"aliases": [],
|
||||
"hidden": false,
|
||||
"path": "/packages/angular/src/executors/browser-esbuild/schema.json",
|
||||
"type": "executor"
|
||||
}
|
||||
@@ -16,11 +16,7 @@
|
||||
},
|
||||
{
|
||||
"name": "Updating Project Dependencies for Buildable Library",
|
||||
"keys": [
|
||||
"project",
|
||||
"updateBuildableProjectDepsInPackageJson",
|
||||
"buildableProjectDepsInPackageJsonType"
|
||||
]
|
||||
"keys": ["project"]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
@@ -43,13 +39,15 @@
|
||||
"updateBuildableProjectDepsInPackageJson": {
|
||||
"type": "boolean",
|
||||
"description": "Whether to update the buildable project dependencies in the build output package.json.",
|
||||
"default": true
|
||||
"default": false,
|
||||
"x-deprecated": "Configure the project to use the '@nx/dependency-checks' ESLint rule instead (https://nx.dev/packages/eslint-plugin/documents/dependency-checks). It will be removed in v17."
|
||||
},
|
||||
"buildableProjectDepsInPackageJsonType": {
|
||||
"type": "string",
|
||||
"description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.",
|
||||
"enum": ["dependencies", "peerDependencies"],
|
||||
"default": "peerDependencies"
|
||||
"default": "peerDependencies",
|
||||
"x-deprecated": "Configure the '@nx/dependency-checks' ESLint rule instead (https://nx.dev/packages/eslint-plugin/documents/dependency-checks). It will be removed in v17."
|
||||
},
|
||||
"tailwindConfig": {
|
||||
"type": "string",
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
{
|
||||
"name": "Updating Project Dependencies for Publishable Library",
|
||||
"keys": [
|
||||
"project",
|
||||
"updateBuildableProjectDepsInPackageJson",
|
||||
"buildableProjectDepsInPackageJsonType"
|
||||
"project"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -46,7 +44,8 @@
|
||||
"updateBuildableProjectDepsInPackageJson": {
|
||||
"type": "boolean",
|
||||
"description": "Whether to update the buildable project dependencies in the build output package.json.",
|
||||
"default": true
|
||||
"default": false,
|
||||
"x-deprecated": "Configure the project to use the '@nx/dependency-checks' ESLint rule instead (https://nx.dev/packages/eslint-plugin/documents/dependency-checks). It will be removed in v17."
|
||||
},
|
||||
"buildableProjectDepsInPackageJsonType": {
|
||||
"type": "string",
|
||||
@@ -55,7 +54,8 @@
|
||||
"dependencies",
|
||||
"peerDependencies"
|
||||
],
|
||||
"default": "peerDependencies"
|
||||
"default": "peerDependencies",
|
||||
"x-deprecated": "Configure the project to use the '@nx/dependency-checks' ESLint rule instead (https://nx.dev/packages/eslint-plugin/documents/dependency-checks). It will be removed in v17."
|
||||
},
|
||||
"tailwindConfig": {
|
||||
"type": "string",
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"title": "Schema for Webpack Browser",
|
||||
"description": "The webpack-browser executor is very similar to the standard browser builder provided by the Angular Devkit. It allows you to build your Angular application to a build artifact that can be hosted online. There are some key differences: \n- Supports Custom Webpack Configurations \n- Supports Incremental Building",
|
||||
"examplesFile": "##### Using a custom webpack configuration\n\nThe executor supports providing a path to a custom webpack configuration. This allows you to customize how your Angular application is built. It currently supports the following types of webpack configurations:\n\n- `object`\n- `Function`\n- `Promise<object|Function>`\n\nThe executor will merge the provided configuration with the webpack configuration that Angular Devkit uses. The merge order is:\n\n- Angular Devkit Configuration\n- Provided Configuration\n\nTo use a custom webpack configuration when building your Angular application, change the `build` target in your `project.json` to match the following:\n\n```typescript\n\"build\": {\n \"executor\": \"@nx/angular:webpack-browser\",\n \"options\": {\n ...\n \"customWebpackConfig\": {\n \"path\": \"apps/appName/webpack.config.js\"\n }\n }\n}\n```\n\n##### Incrementally Building your Application\n\nThe executor supports incrementally building your Angular application by building the workspace libraries it depends on _(that have been marked as buildable)_ and then building your application using the built source of the libraries.\n\nThis can improve build time as the building of the workspace libraries can be cached, meaning they only have to be rebuilt if they have changed.\n\n> Note: There may be some additional overhead in the linking of the built libraries' sources which may reduce the overall improvement in build time. Therefore this approach only benefits large applications and would likely have a negative impact on small and medium applications. \n> You can read more about when to use incremental builds [here](/more-concepts/incremental-builds#when-should-i-use-incremental-builds).\n\nTo allow your Angular application to take advantage of incremental building, change the `build` target in your `project.json` to match the following:\n\n```typescript\n\"build\": {\n \"executor\": \"@nx/angular:webpack-browser\",\n \"options\": {\n ...\n \"buildLibsFromSource\": false\n }\n}\n```\n",
|
||||
"examplesFile": "##### Using a custom webpack configuration\n\nThe executor supports providing a path to a custom webpack configuration. This allows you to customize how your Angular application is built. It currently supports the following types of webpack configurations:\n\n- `object`\n- `Function`\n- `Promise<object|Function>`\n\nThe executor will merge the provided configuration with the webpack configuration that Angular Devkit uses. The merge order is:\n\n- Angular Devkit Configuration\n- Provided Configuration\n\nTo use a custom webpack configuration when building your Angular application, change the `build` target in your `project.json` to match the following:\n\n```typescript\n\"build\": {\n \"executor\": \"@nx/angular:webpack-browser\",\n \"options\": {\n ...\n \"customWebpackConfig\": {\n \"path\": \"apps/appName/webpack.config.js\"\n }\n }\n}\n```\n\n##### Incrementally Building your Application\n\nThe executor supports incrementally building your Angular application by building the workspace libraries it depends on _(that have been marked as buildable)_ and then building your application using the built source of the libraries.\n\nThis can improve build time as the building of the workspace libraries can be cached, meaning they only have to be rebuilt if they have changed.\n\n> Note: There may be some additional overhead in the linking of the built libraries' sources which may reduce the overall improvement in build time. Therefore this approach only benefits large applications and would likely have a negative impact on small and medium applications. \n> You can read more about when to use incremental builds [here](/concepts/more-concepts/incremental-builds#when-should-i-use-incremental-builds).\n\nTo allow your Angular application to take advantage of incremental building, change the `build` target in your `project.json` to match the following:\n\n```typescript\n\"build\": {\n \"executor\": \"@nx/angular:webpack-browser\",\n \"options\": {\n ...\n \"buildLibsFromSource\": false\n }\n}\n```\n",
|
||||
"type": "object",
|
||||
"presets": [
|
||||
{
|
||||
|
||||
@@ -102,8 +102,9 @@
|
||||
},
|
||||
"e2eTestRunner": {
|
||||
"type": "string",
|
||||
"enum": ["cypress", "none"],
|
||||
"enum": ["cypress", "playwright", "none"],
|
||||
"description": "Test runner to use for end to end (E2E) tests.",
|
||||
"x-prompt": "Which E2E test runner would you like to use?",
|
||||
"default": "cypress"
|
||||
},
|
||||
"tags": {
|
||||
|
||||
@@ -32,6 +32,13 @@
|
||||
"examples": ["awesome.component"],
|
||||
"x-priority": "important"
|
||||
},
|
||||
"interactionTests": {
|
||||
"type": "boolean",
|
||||
"description": "Set up Storybook interaction tests.",
|
||||
"x-prompt": "Do you want to set up Storybook interaction tests?",
|
||||
"x-priority": "important",
|
||||
"default": true
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
"type": "boolean",
|
||||
|
||||
@@ -109,8 +109,9 @@
|
||||
},
|
||||
"e2eTestRunner": {
|
||||
"type": "string",
|
||||
"enum": ["cypress", "none"],
|
||||
"enum": ["cypress", "playwright", "none"],
|
||||
"description": "Test runner to use for end to end (E2E) tests.",
|
||||
"x-prompt": "Which E2E test runner would you like to use?",
|
||||
"default": "cypress"
|
||||
},
|
||||
"tags": {
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
},
|
||||
"e2eTestRunner": {
|
||||
"type": "string",
|
||||
"enum": ["cypress", "none"],
|
||||
"enum": ["cypress", "playwright", "none"],
|
||||
"x-prompt": "Which E2E test runner would you like to use?",
|
||||
"description": "Test runner to use for end to end (e2e) tests.",
|
||||
"default": "cypress",
|
||||
"x-priority": "important"
|
||||
|
||||
@@ -103,8 +103,9 @@
|
||||
},
|
||||
"e2eTestRunner": {
|
||||
"type": "string",
|
||||
"enum": ["cypress", "none"],
|
||||
"enum": ["cypress", "playwright", "none"],
|
||||
"description": "Test runner to use for end to end (E2E) tests.",
|
||||
"x-prompt": "Which E2E test runner would you like to use?",
|
||||
"default": "cypress"
|
||||
},
|
||||
"tags": {
|
||||
|
||||
@@ -18,11 +18,16 @@
|
||||
"x-dropdown": "projects",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"interactionTests": {
|
||||
"type": "boolean",
|
||||
"description": "Set up Storybook interaction tests.",
|
||||
"x-prompt": "Do you want to set up Storybook interaction tests?",
|
||||
"x-priority": "important",
|
||||
"default": true
|
||||
},
|
||||
"generateCypressSpecs": {
|
||||
"type": "boolean",
|
||||
"description": "Specifies whether to automatically generate `*.spec.ts` files in the Cypress e2e app generated by the `cypress-configure` generator.",
|
||||
"x-prompt": "Do you want to generate Cypress specs as well?",
|
||||
"x-priority": "important"
|
||||
"description": "Specifies whether to automatically generate `*.spec.ts` files in the Cypress e2e app generated by the `cypress-configure` generator."
|
||||
},
|
||||
"cypressProject": {
|
||||
"type": "string",
|
||||
@@ -49,7 +54,7 @@
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["name"],
|
||||
"examplesFile": "This generator will generate stories for all your components in your project. The stories will be generated using [Component Story Format 3 (CSF3)](https://storybook.js.org/blog/storybook-csf3-is-here/).\n\n```bash\nnx g @nx/angular:stories project-name\n```\n\nYou can read more about how this generator works, in the [Storybook for Angular overview page](/packages/storybook/documents/overview-angular#auto-generate-stories).\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- Whether you want to `generateCypressSpecs`. If you choose `yes`, a test file is going to be generated in the project's Cypress e2e app for each of your components.\n\nYou must provide a `name` for the generator to work.\n\nThere are a number of other options available. Let's take a look at some examples.\n\n## Examples\n\n### Ignore certain paths when generating stories\n\n```bash\nnx g @nx/angular:stories ui --ignorePaths=libs/ui/src/not-stories/**,**/**/src/**/*.other.*\n```\n\nThis will generate stories for all the components in the `ui` project, except for the ones in the `libs/ui/src/not-stories` directory, and also for components that their file name is of the pattern `*.other.*`.\n\nThis is useful if you have a project that contains components that are not meant to be used in isolation, but rather as part of a larger component.\n",
|
||||
"examplesFile": "This generator will generate stories for all your components in your project. The stories will be generated using [Component Story Format 3 (CSF3)](https://storybook.js.org/blog/storybook-csf3-is-here/).\n\n```bash\nnx g @nx/angular:stories project-name\n```\n\nYou can read more about how this generator works, in the [Storybook for Angular overview page](/packages/storybook/documents/overview-angular#auto-generate-stories).\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- Whether you want to set up [Storybook interaction tests](https://storybook.js.org/docs/angular/writing-tests/interaction-testing) (`interactionTests`). If you choose `yes`, a `play` function will be added to your stories, and all the necessary dependencies will be installed. You can read more about this in the [Nx Storybook interaction tests documentation page](/packages/storybook/documents/interaction-tests).\n\nYou must provide a `name` for the generator to work.\n\nBy default, this generator will also set up [Storybook interaction tests](https://storybook.js.org/docs/angular/writing-tests/interaction-testing). If you don't want to set up Storybook interaction tests, you can pass the `--interactionTests=false` option, but it's not recommended.\n\nThere are a number of other options available. Let's take a look at some examples.\n\n## Examples\n\n### Ignore certain paths when generating stories\n\n```bash\nnx g @nx/angular:stories ui --ignorePaths=libs/ui/src/not-stories/**,**/**/src/**/*.other.*\n```\n\nThis will generate stories for all the components in the `ui` project, except for the ones in the `libs/ui/src/not-stories` directory, and also for components that their file name is of the pattern `*.other.*`.\n\nThis is useful if you have a project that contains components that are not meant to be used in isolation, but rather as part of a larger component.\n",
|
||||
"presets": []
|
||||
},
|
||||
"description": "Creates stories/specs for all components declared in a project.",
|
||||
|
||||
@@ -18,12 +18,17 @@
|
||||
"x-dropdown": "projects",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"interactionTests": {
|
||||
"type": "boolean",
|
||||
"description": "Set up Storybook interaction tests.",
|
||||
"x-prompt": "Do you want to set up Storybook interaction tests?",
|
||||
"alias": ["configureTestRunner"],
|
||||
"x-priority": "important",
|
||||
"default": true
|
||||
},
|
||||
"configureCypress": {
|
||||
"type": "boolean",
|
||||
"description": "Specifies whether to configure Cypress or not.",
|
||||
"x-prompt": "Configure a Cypress e2e app to run against the storybook instance?",
|
||||
"default": true,
|
||||
"x-priority": "important"
|
||||
"description": "Specifies whether to configure Cypress or not."
|
||||
},
|
||||
"generateStories": {
|
||||
"type": "boolean",
|
||||
@@ -34,10 +39,7 @@
|
||||
},
|
||||
"generateCypressSpecs": {
|
||||
"type": "boolean",
|
||||
"description": "Specifies whether to automatically generate test files in the generated Cypress e2e app.",
|
||||
"x-prompt": "Automatically generate test files in the generated Cypress e2e app?",
|
||||
"default": true,
|
||||
"x-priority": "important"
|
||||
"description": "Specifies whether to automatically generate test files in the generated Cypress e2e app."
|
||||
},
|
||||
"configureStaticServe": {
|
||||
"type": "boolean",
|
||||
@@ -59,7 +61,7 @@
|
||||
"tsConfiguration": {
|
||||
"type": "boolean",
|
||||
"description": "Configure your project with TypeScript. Generate main.ts and preview.ts files, instead of main.js and preview.js.",
|
||||
"default": false,
|
||||
"default": true,
|
||||
"x-priority": "important"
|
||||
},
|
||||
"skipFormat": {
|
||||
@@ -79,15 +81,11 @@
|
||||
"**/**/src/**/*.other.*",
|
||||
"libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts"
|
||||
]
|
||||
},
|
||||
"configureTestRunner": {
|
||||
"type": "boolean",
|
||||
"description": "Add a Storybook Test-Runner target."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["name"],
|
||||
"examplesFile": "This generator will set up Storybook for your **Angular** project. By default, starting Nx 16, Storybook v7 is used.\n\n```bash\nnx g @nx/angular:storybook-configuration project-name\n```\n\nYou can read more about how this generator works, in the [Storybook for Angular overview page](/packages/storybook/documents/overview-angular#generate-storybook-configuration-for-an-angular-project).\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- Whether you want to `configureCypress`. If you choose `yes`, a Cypress e2e app will be created (or configured) to run against the project's Storybook instance. You can read more about this in the [Storybook for Angular - Cypress section](/packages/storybook/documents/overview-angular#cypress-tests-for-stories).\n- Whether you want to `generateStories` for the components in your project. If you choose `yes`, a `.stories.ts` file will be generated next to each of your components in your project.\n- Whether you want to `generateCypressSpecs`. If you choose `yes`, a test file is going to be generated in the project's Cypress e2e app for each of your components.\n- Whether you want to `configureTestRunner`. If you choose `yes`, a `test-storybook` target will be generated in your project's `project.json`, with a command to invoke the [Storybook `test-runner`](https://storybook.js.org/docs/react/writing-tests/test-runner).\n\nYou must provide a `name` for the generator to work.\n\nThere are a number of other options available. Let's take a look at some examples.\n\n## Examples\n\n### Generate Storybook configuration\n\n```bash\nnx g @nx/angular:storybook-configuration ui\n```\n\nThis will generate Storybook configuration for the `ui` project.\n\n### Generate Storybook configuration using TypeScript\n\n```bash\nnx g @nx/angular:storybook-configuration ui --tsConfiguration=true\n```\n\nThis will generate Storybook configuration for the `ui` project using TypeScript for the Storybook configuration files (the files inside the `.storybook` directory, eg. `.storybook/main.ts`).\n\n### Ignore certain paths when generating stories\n\n```bash\nnx g @nx/angular:storybook-configuration ui --generateStories=true --ignorePaths=libs/ui/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts\n```\n\nThis will generate a Storybook configuration for the `ui` project and generate stories for all components in the `libs/ui/src/lib` directory, except for the ones in the `libs/ui/src/not-stories` directory, and the ones in the `apps/my-app` directory that end with `.something.ts`, and also for components that their file name is of the pattern `*.other.*`.\n\nThis is useful if you have a project that contains components that are not meant to be used in isolation, but rather as part of a larger component.\n",
|
||||
"examplesFile": "This generator will set up Storybook for your **Angular** project. By default, starting Nx 16, Storybook v7 is used.\n\n```bash\nnx g @nx/angular:storybook-configuration project-name\n```\n\nYou can read more about how this generator works, in the [Storybook for Angular overview page](/packages/storybook/documents/overview-angular#generate-storybook-configuration-for-an-angular-project).\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- Whether you want to set up [Storybook interaction tests](https://storybook.js.org/docs/angular/writing-tests/interaction-testing) (`interactionTests`). If you choose `yes`, a `play` function will be added to your stories, and all the necessary dependencies will be installed. Also, a `test-storybook` target will be generated in your project's `project.json`, with a command to invoke the [Storybook `test-runner`](https://storybook.js.org/docs/angular/writing-tests/test-runner). You can read more about this in the [Nx Storybook interaction tests documentation page](/packages/storybook/documents/interaction-tests).\n- Whether you want to `generateStories` for the components in your project. If you choose `yes`, a `.stories.ts` file will be generated next to each of your components in your project.\n\nYou must provide a `name` for the generator to work.\n\nBy default, this generator will also set up [Storybook interaction tests](https://storybook.js.org/docs/angular/writing-tests/interaction-testing). If you don't want to set up Storybook interaction tests, you can pass the `--interactionTests=false` option, but it's not recommended.\n\nThere are a number of other options available. Let's take a look at some examples.\n\n## Examples\n\n### Generate Storybook configuration\n\n```bash\nnx g @nx/angular:storybook-configuration ui\n```\n\nThis will generate Storybook configuration for the `ui` project using TypeScript for the Storybook configuration files (the files inside the `.storybook` directory, eg. `.storybook/main.ts`).\n\n### Ignore certain paths when generating stories\n\n```bash\nnx g @nx/angular:storybook-configuration ui --generateStories=true --ignorePaths=libs/ui/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts\n```\n\nThis will generate a Storybook configuration for the `ui` project and generate stories for all components in the `libs/ui/src/lib` directory, except for the ones in the `libs/ui/src/not-stories` directory, and the ones in the `apps/my-app` directory that end with `.something.ts`, and also for components that their file name is of the pattern `*.other.*`.\n\nThis is useful if you have a project that contains components that are not meant to be used in isolation, but rather as part of a larger component.\n\n### Generate Storybook configuration using JavaScript\n\n```bash\nnx g @nx/angular:storybook-configuration ui --tsConfiguration=false\n```\n\nBy default, our generator generates TypeScript Storybook configuration files. You can choose to use JavaScript for the Storybook configuration files of your project (the files inside the `.storybook` directory, eg. `.storybook/main.js`).\n",
|
||||
"presets": []
|
||||
},
|
||||
"description": "Adds Storybook configuration to a project.",
|
||||
|
||||
@@ -51,7 +51,7 @@ Replace `your-app-name` with the app's name as defined in your `tsconfig.base.js
|
||||
|
||||
Run `nx e2e frontend-e2e` to execute e2e tests with Cypress.
|
||||
|
||||
You can run your e2e test against a production build by using the `production` [configuration](https://nx.dev/recipes/executors/use-executor-configurations#use-executor-configurations)
|
||||
You can run your e2e test against a production build by using the `production` [configuration](https://nx.dev/plugin-features/use-task-executors#use-executor-configurations)
|
||||
|
||||
```shell
|
||||
nx e2e frontend-e2e --configuration=production
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "component-configuration",
|
||||
"aliases": ["cypress-component-configuration"],
|
||||
"factory": "./src/generators/component-configuration/component-configuration",
|
||||
"schema": {
|
||||
"$schema": "http://json-schema.org/schema",
|
||||
"$id": "NxCypressComponentConfiguration",
|
||||
"cli": "nx",
|
||||
"title": "Set up Cypress component testing for a project",
|
||||
"description": "Set up Cypress component test for a project.",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"command": "nx g @nx/cypress:component-configuration --project=my-cool-lib ",
|
||||
"description": "Add cypress component testing to an existing project named my-cool-lib"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The name of the project to add cypress component testing to",
|
||||
"$default": { "$source": "projectName" },
|
||||
"x-prompt": "What project should we add Cypress component testing to?"
|
||||
},
|
||||
"bundler": {
|
||||
"description": "The Cypress bundler to use.",
|
||||
"type": "string",
|
||||
"enum": ["vite", "webpack"],
|
||||
"x-prompt": "Which Cypress bundler do you want to use for the dev-server?",
|
||||
"default": "webpack"
|
||||
},
|
||||
"directory": {
|
||||
"type": "string",
|
||||
"description": "A directory where the project is placed relative from the project root",
|
||||
"default": "cypress"
|
||||
}
|
||||
},
|
||||
"required": ["project"],
|
||||
"examplesFile": "This is a framework-agnostic generator for adding component testing to a project.\n\n```bash\nnx g cypress-component-configuration --project=my-cool-project\n```\n\nRunning this generator, adds the required files to the specified project without any configurations for Cypress. It's best to use the framework specific generator, instead `cypress-component-configuration` directly\n\n- [React component testing](/packages/react/generators/cypress-component-configuration)\n- [Angular component testing](/packages/angular/generators/cypress-component-configuration)\n\nA new `component-test` target will be added to the specified project.\n\n```bash\nnx g component-test my-cool-project\n```\n\nRead more about [Cypress Component Testing](/cypress/cypress-component-testing)\n",
|
||||
"presets": []
|
||||
},
|
||||
"description": "Set up Cypress Component Test for a project",
|
||||
"hidden": true,
|
||||
"implementation": "/packages/cypress/src/generators/component-configuration/component-configuration.ts",
|
||||
"path": "/packages/cypress/src/generators/component-configuration/schema.json",
|
||||
"type": "generator"
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"name": "configuration",
|
||||
"aliases": ["cypress-e2e-configuration", "e2e", "e2e-config"],
|
||||
"factory": "./src/generators/configuration/configuration",
|
||||
"schema": {
|
||||
"$schema": "http://json-schema.org/schema",
|
||||
"$id": "NxCypressE2EConfigGenerator",
|
||||
"cli": "nx",
|
||||
"title": "Add a Cypress Configuration.",
|
||||
"description": "Add a Cypress configuration to an existing project.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The project to add a Cypress configuration to",
|
||||
"$default": { "$source": "projectName" },
|
||||
"x-priority": "important",
|
||||
"x-prompt": "What project do you want to add Cypress to?"
|
||||
},
|
||||
"devServerTarget": {
|
||||
"type": "string",
|
||||
"description": "A devServerTarget,'<projectName>:<targetName>[:<configName>], that will be used to run tests against. This is usually the app this project will be used in. Pass --baseUrl if you wish to not use a devServerTarget.",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"port": {
|
||||
"oneOf": [
|
||||
{ "type": "string", "enum": ["cypress-auto"] },
|
||||
{ "type": "number" }
|
||||
],
|
||||
"description": "Set the 'port' option on the e2e target. It's recommend to set a different port so you can run tests e2e targets in parallel. Most dev servers support using '0' to automatically find a free port. The value 'cypress-auto' can be used if the underlying dev server does not support automatically finding a free port.",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"baseUrl": {
|
||||
"type": "string",
|
||||
"description": "The address (with the port) which your application is running on. If you wish to start your application when running the e2e target, then use --devServerTarget instead."
|
||||
},
|
||||
"directory": {
|
||||
"type": "string",
|
||||
"description": "A directory where the project is placed relative from the project root",
|
||||
"x-priority": "important",
|
||||
"default": "cypress"
|
||||
},
|
||||
"linter": {
|
||||
"description": "The tool to use for running lint checks.",
|
||||
"type": "string",
|
||||
"enum": ["eslint", "none"],
|
||||
"default": "eslint"
|
||||
},
|
||||
"js": {
|
||||
"description": "Generate JavaScript files rather than TypeScript files.",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"setParserOptionsProject": {
|
||||
"type": "boolean",
|
||||
"description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
|
||||
"default": false
|
||||
},
|
||||
"skipPackageJson": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Do not add dependencies to `package.json`.",
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"rootProject": {
|
||||
"description": "Create a application at the root of the workspace",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"hidden": true,
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"bundler": {
|
||||
"description": "The Cypress bundler to use.",
|
||||
"type": "string",
|
||||
"enum": ["vite", "webpack", "none"],
|
||||
"x-prompt": "Which Cypress bundler do you want to use?",
|
||||
"default": "webpack"
|
||||
}
|
||||
},
|
||||
"required": ["project"],
|
||||
"examplesFile": "This is a generator to add a cypress e2e configuration to an existing project.\n\n```bash\nnx g @nx/cypress:configuration --project=my-cool-project --devServerTarget=some-app:serve\n```\n\nRunning this generator, adds the required files to run cypress tests for a project,\nMainly a `cypress.config.ts` file and default files in the `<project-root>/cypress/` directory.\nTests will be located in `<project-root>/cypress/e2e/*` by default.\n\nYou can customize the directory used via the `--directory` flag, the value is relative to the project root.\n\nFor example if you wanted to place the files inside an `e2e` folder\n\n```bash\nnx g @nx/cypress:configuration --project=my-cool-project --devServerTarget=some-app:serve --directory=e2e\n```\n\nProviding a `--devServerTarget` is optional if you provide a `--baseUrl` or the project you're adding the configuration to has a `serve` target already.\nOtherwise, a `--devServerTarget` is recommend for the `@nx/cypress:cypress` executor to spin up the dev server for you automatically when needed.\n\n## Feature Based Testing\n\nThis generator helps in creating feature based e2e/integration testing setups where you can place the feature tests in the same project as the feature library.\nThis differs from creating a separate e2e project that contained all tests for an application which can easily cause more tests to run than is strictly necessary.\n\nTake the following workspace where the `feature-cart` project is affected.\n\n{% graph height=\"450px\" %}\n\n```json\n{\n \"projects\": [\n {\n \"type\": \"app\",\n \"name\": \"fancy-app\",\n \"data\": {\n \"tags\": []\n }\n },\n {\n \"type\": \"app\",\n \"name\": \"fancy-app-e2e\",\n \"data\": {\n \"tags\": []\n }\n },\n {\n \"type\": \"lib\",\n \"name\": \"feature-user\",\n \"data\": {\n \"tags\": []\n }\n },\n {\n \"type\": \"lib\",\n \"name\": \"feature-dashboard\",\n \"data\": {\n \"tags\": []\n }\n },\n {\n \"type\": \"lib\",\n \"name\": \"feature-cart\",\n \"data\": {\n \"tags\": []\n }\n }\n ],\n \"groupByFolder\": false,\n \"workspaceLayout\": {\n \"appsDir\": \"apps\",\n \"libsDir\": \"libs\"\n },\n \"dependencies\": {\n \"fancy-app\": [\n {\n \"target\": \"feature-user\",\n \"source\": \"fancy-app\",\n \"type\": \"static\"\n },\n {\n \"target\": \"feature-cart\",\n \"source\": \"fancy-app\",\n \"type\": \"static\"\n }\n ],\n \"fancy-app-e2e\": [\n {\n \"target\": \"fancy-app\",\n \"source\": \"fancy-app-e2e\",\n \"type\": \"implicit\"\n }\n ],\n \"feature-user\": [\n {\n \"target\": \"feature-dashboard\",\n \"source\": \"feature-user\",\n \"type\": \"direct\"\n }\n ],\n \"feature-cart\": [],\n \"feature-dashboard\": []\n },\n \"affectedProjectIds\": [\"feature-cart\", \"fancy-app\", \"fancy-app-e2e\"]\n}\n```\n\n{% /graph %}\n\nIn this case, if tests for the all the `feature-*` projects where contained in the `fancy-app-e2e` project, then all of those features will be tested in the app, when only the `feature-cart` tests need to run.\n\nRunning these e2e/integration tests more often than they should results in longer CI times.\n\nBrining those e2e test closer to each feature can result is lowering CI times since we don't need to test those features if they did not change.\n\nBuilding this way leaves the `fancy-app-e2e` for mostly smoke type testing instead of more in-depth feature testing.\n\nUsing the `@nx/cypress:configuration` generator can help you accomplish this in your workspace.\n\n```bash\nnx g @nx/cypress:configuration --project=feature-cart --devServerTarget=fancy-app:serve\nnx g @nx/cypress:configuration --project=feature-user --devServerTarget=fancy-app:serve\nnx g @nx/cypress:configuration --project=feature-dashboard --devServerTarget=fancy-app:serve\n```\n\nEach project will now get their own `e2e` target, where the feature project is only concerned with itself. This allows for more focused tests without worrying about forcing unrelated tests to also run.\n\nIt's important to remember that these feature tests are still going to be leveraging the same app to run the tests against so if you plan to run in parallel, you can leverage using a file server and the ability for `@nx/cypress:cypress` executor to pass through a port or find a free port to allow running tests in parallel. Read more [about the --port flag](/packages/cypress/executors/cypress#port)\n",
|
||||
"presets": []
|
||||
},
|
||||
"description": "Add a Cypress E2E Configuration to an existing project.",
|
||||
"implementation": "/packages/cypress/src/generators/configuration/configuration.ts",
|
||||
"hidden": false,
|
||||
"path": "/packages/cypress/src/generators/configuration/schema.json",
|
||||
"type": "generator"
|
||||
}
|
||||
@@ -45,13 +45,13 @@ This command will install the esbuild plugin if needed, and set `@nx/esbuild:esb
|
||||
If you already have a JS project that you want to use esbuild for, run this command:
|
||||
|
||||
```shell
|
||||
nx g esbuild-project mylib
|
||||
nx g @nx/esbuild:configuration mylib
|
||||
```
|
||||
|
||||
This generator validates there isn't an existing `build` target. If you want to overwrite the existing target you can pass the `--skipValidation` option.
|
||||
|
||||
```shell
|
||||
nx g esbuild-project mylib --skipValidation
|
||||
nx g @nx/esbuild:configuration mylib --skipValidation
|
||||
```
|
||||
|
||||
## Using esbuild
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"examplesFile": "`<app-root>/project.json`:\n\n```json\n{\n //...\n \"targets\": {\n //...\n \"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\"\n }\n }\n }\n}\n```\n\n```bash\nnx build <app-name>\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"CommonJS output\" %}\n\nThe CommonJS format is required in some environments, such as Electron applications. By default, `esbuild` will use the ESM format, which is recommended for Web and Node applications. You may also output to multiple formats.\n\n```bash\nnx build <app-name> --format=cjs\nnx build <app-name> --format=esm,cjs\nnx build <app-name> # defaults to es# defaults to esm\n```\n\n```json\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\",\n \"format\": [\"esm\", \"cjs\"]\n}\n```\n\n{% /tab %}\n{% tab label=\"External packages\" %}\n\nYou can avoid packages from being bundled by providing the `external` option with a list of packages to skip.\n\nYou can also use `*` wildcard to match assets.\n\n```json\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\",\n \"external\": [\"lodash\", \"*.png\"]\n}\n```\n\n{% /tab %}\n{% tab label=\"Skip type checking\" %}\n\nType checking is the slowest part of the build. You may want to skip type checking during build and run it as another job in CI.\n\n```json\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\",\n \"skipTypeCheck\": true\n}\n```\n\n{% /tab %}\n{% tab label=\"Additional esbuild options\" %}\n\nAdditional [esbuild options](https://esbuild.github.io/api/) can be passed using `esbuildOptions` in your project configuration.\n\n```json\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\",\n \"esbuildOptions\": {\n \"legalComments\": \"inline\"\n \"banner\": {\n \".js\": \"// banner\"\n },\n \"footer\": {\n \".js\": \"// footer\"\n }\n }\n}\n```\n\n{% /tab %}\n{% tabs %}\n",
|
||||
"examplesFile": "`<app-root>/project.json`:\n\n```jsonc\n{\n //...\n \"targets\": {\n //...\n \"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\"\n }\n }\n }\n}\n```\n\n```bash\nnx build <app-name>\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"CommonJS output\" %}\n\nThe CommonJS format is required in some environments, such as Electron applications. By default, `esbuild` will use the ESM format, which is recommended for Web and Node applications. You may also output to multiple formats.\n\n```bash\nnx build <app-name> --format=cjs\nnx build <app-name> --format=esm,cjs\nnx build <app-name> # defaults to es# defaults to esm\n```\n\n```json\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\",\n \"format\": [\"esm\", \"cjs\"]\n}\n```\n\n{% /tab %}\n{% tab label=\"External packages\" %}\n\nYou can avoid packages from being bundled by providing the `external` option with a list of packages to skip.\n\nYou can also use `*` wildcard to match assets.\n\n```json\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\",\n \"external\": [\"lodash\", \"*.png\"]\n}\n```\n\n{% /tab %}\n{% tab label=\"Skip type checking\" %}\n\nType checking is the slowest part of the build. You may want to skip type checking during build and run it as another job in CI.\n\n```json\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\",\n \"skipTypeCheck\": true\n}\n```\n\n{% /tab %}\n{% tab label=\"Additional esbuild options\" %}\n\nAdditional [esbuild options](https://esbuild.github.io/api/) can be passed using `esbuildOptions` in your project configuration.\n\n```json\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\",\n \"esbuildOptions\": {\n \"legalComments\": \"inline\"\n \"banner\": {\n \".js\": \"// banner\"\n },\n \"footer\": {\n \".js\": \"// footer\"\n }\n }\n}\n```\n\n{% /tab %}\n{% tabs %}\n",
|
||||
"presets": []
|
||||
},
|
||||
"description": "Bundle a package using EsBuild.",
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"name": "configuration",
|
||||
"aliases": ["esbuild-project"],
|
||||
"factory": "./src/generators/configuration/configuration",
|
||||
"schema": {
|
||||
"$schema": "http://json-schema.org/schema",
|
||||
"$id": "NxEsBuildProject",
|
||||
"cli": "nx",
|
||||
"title": "Add esbuild configuration to a project",
|
||||
"description": "Add esbuild configuration to a project.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The name of the project.",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-dropdown": "project",
|
||||
"x-prompt": "What is the name of the project to set up a esbuild for?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"main": {
|
||||
"type": "string",
|
||||
"description": "Path relative to the workspace root for the main entry file. Defaults to `<project-root>/src/main.ts` or `<project-root>src/index.ts`, whichever is found.",
|
||||
"alias": "entryFile",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"tsConfig": {
|
||||
"type": "string",
|
||||
"description": "Path relative to the workspace root for the tsconfig file to build with. Defaults to `<project-root>/tsconfig.app.json` or `<project-root>/tsconfig.lib.json`, whichever is found.",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"skipPackageJson": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Do not add dependencies to `package.json`.",
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"skipValidation": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Do not perform any validation on existing project.",
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"importPath": {
|
||||
"type": "string",
|
||||
"description": "The library name used to import it, like `@myorg/my-awesome-lib`."
|
||||
},
|
||||
"platform": {
|
||||
"type": "string",
|
||||
"description": "Platform target for outputs.",
|
||||
"enum": ["browser", "node", "neutral"],
|
||||
"default": "node"
|
||||
},
|
||||
"buildTarget": {
|
||||
"description": "The build target to add.",
|
||||
"type": "string",
|
||||
"default": "build"
|
||||
}
|
||||
},
|
||||
"required": [],
|
||||
"examplesFile": "```bash\nnx g @nx/esbuild:configuration my-package\n```\n\n{% callout type=\"note\" title=\"Overwriting existing build option\" %}\nThe `configuration` generator validates that an existing `build` target isn't already defined for the project. If you are adding esbuild to a project with an existing `build` target, pass the `--skipValidation` option.\n{% /callout %}\n\nYou may also provide a custom main entry file, or a custom tsconfig file if the defaults don't work. By default, the generator will look for a main file matching `src/index.ts` or `src/main.ts`, and a tsconfig file matching `tsconfig.app.json` or `tsconfig.lib.json`.\n\n```bash\nnx g @nx/esbuild:configuration my-package \\\n--main=packages/my-package/src/entry.ts \\\n--tsConfig=packages/my-package/tsconfig.custom.json\n```\n",
|
||||
"presets": []
|
||||
},
|
||||
"description": "Add esbuild configuration to a project.",
|
||||
"hidden": true,
|
||||
"implementation": "/packages/esbuild/src/generators/configuration/configuration.ts",
|
||||
"path": "/packages/esbuild/src/generators/configuration/schema.json",
|
||||
"type": "generator"
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
# Dependency Checks rule
|
||||
|
||||
The `@nx/dependency-checks` ESLint rule enables you to discover mismatches between dependencies specified in a project's `package.json` and the dependencies that your project depends on. If your project is using, for example, the `axios`, but the `package.json` does not specify it as a dependency, your library might not work correctly. This rule helps catch these problems before your users do.
|
||||
|
||||
The rule uses the project graph to collect all the dependencies of your project, based on the input of your `build` target. It will filter out all the dependencies marked as `devDependencies` in your root `package.json` to ensure dependencies of your compilation pipelines (e.g. dependencies of `webpack.config` or `vite.config`) or test setups are not included in the expected list.
|
||||
|
||||
We use the version numbers of the installed packages when checking whether the version specifier in `package.json` is correct. We do this because this is the only version for which we can "guarantee" that things work and were tested. If you specify a range outside of that version, that would mean that you are shipping potentially untested code.
|
||||
|
||||
## Usage
|
||||
|
||||
Library generators from `@nx` packages will configure this rule automatically when you opt-in for bundler/build setup. This rule is intended for publishable/buildable libraries, so it will only run if a `build` target is detected in the configuration (this name can be modified - see [options](#options)).
|
||||
|
||||
### Manual setup
|
||||
|
||||
To set it up manually for existing libraries, you need to add the `dependency-checks` rule to your project's ESLint configuration:
|
||||
|
||||
```jsonc {% fileName="<your-project-root>/.eslintrc.json" %}
|
||||
{
|
||||
// ... more ESLint config here
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.json"],
|
||||
"parser": "jsonc-eslint-parser",
|
||||
"rules": {
|
||||
"@nx/dependency-checks": "error"
|
||||
}
|
||||
}
|
||||
// ... more ESLint overrides here
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Additionally, you need to adjust your `lintFilePatterns` to include the project's `package.json` file::
|
||||
|
||||
```jsonc {% fileName="<your-project-root>/project.json" %}
|
||||
{
|
||||
// ... project.json config
|
||||
"targets": {
|
||||
// ... more targets
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"libs/my-lib/**/*.{ts,tsx,js,jsx}",
|
||||
"libs/my-lib/package.json" // add this line
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Overriding defaults
|
||||
|
||||
Sometimes we intentionally want to add or remove a dependency from our `package.json` despite what the rule suggests. We can use the rule's options to override default behavior:
|
||||
|
||||
```jsonc {% fileName=".eslintrc.json" %}
|
||||
{
|
||||
"@nx/dependency-checks": [
|
||||
"error",
|
||||
{
|
||||
"buildTargets": ["build", "custom-build"], // add non standard build target names
|
||||
"ignoredDependencies": ["lodash"], // these libs will be omitted from checks
|
||||
"checkMissingDependencies": true, // toggle to disable
|
||||
"checkObsoleteDependencies": true, // toggle to disable
|
||||
"checkVersionMismatches": true // toggle to disable
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
| Property | Type | Default | Description |
|
||||
| ------------------------- | --------------- | ----------- | ----------------------------------------------------------------------- |
|
||||
| buildTargets | _Array<string>_ | _["build"]_ | List of build target names |
|
||||
| ignoredDependencies | _Array<string>_ | _[]_ | List of dependencies to ignore for checks |
|
||||
| checkMissingDependencies | _boolean_ | _true_ | Disable to skip checking for missing dependencies |
|
||||
| checkObsoleteDependencies | _boolean_ | _true_ | Disable to skip checking for unused dependencies |
|
||||
| checkVersionMismatches | _boolean_ | _true_ | Disable to skip checking if version specifier matches installed version |
|
||||
@@ -1,3 +1,5 @@
|
||||
# Enforce module boundaries rule
|
||||
|
||||
The `@nx/enforce-module-boundaries` ESLint rule enables you to define strict rules for accessing resources between different projects in the repository. Enforcing strict boundaries helps to prevent unplanned cross-dependencies.
|
||||
|
||||
## Usage
|
||||
@@ -51,7 +53,7 @@ The `depConstraints` is an array of objects representing the constraints defined
|
||||
|
||||
Read more about the proper usage of this rule:
|
||||
|
||||
- [Enforce Project Boundaries](/core-features/enforce-project-boundaries)
|
||||
- [Enforce Module Boundaries](/core-features/enforce-module-boundaries)
|
||||
- [Ban Dependencies with Certain Tags](/recipes/enforce-module-boundaries/ban-dependencies-with-tags)
|
||||
- [Tag in Multiple Dimensions](/recipes/enforce-module-boundaries/tag-multiple-dimensions)
|
||||
- [Ban External Imports](/recipes/enforce-module-boundaries/ban-external-imports)
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
The `@nx/eslint-plugin` package is an ESLint plugin that contains a collection of recommended ESLint rule configurations which you can extend from in your own ESLint configs, as well as an Nx-specific lint rule called [enforce-module-boundaries](#enforce-module-boundaries-rule).
|
||||
The `@nx/eslint-plugin` package is an ESLint plugin that contains a collection of recommended ESLint rule configurations which you can extend from in your own ESLint configs, as well as the following Nx-specific ESLint rules:
|
||||
|
||||
- [enforce-module-boundaries](#enforce-module-boundaries-rule)
|
||||
- [dependency-checks](#dependency-checks-rule)
|
||||
|
||||
## Setting Up ESLint Plugin
|
||||
|
||||
@@ -54,4 +57,8 @@ You can also use `@nx/react` which includes all three `@nx/react-*` plugins
|
||||
|
||||
### Enforce Module Boundaries rule
|
||||
|
||||
The `enforce-module-boundaries` ESLint rule enables you to define strict rules for accessing resources between different projects in the repository. Enforcing strict boundaries helps keep prevent unplanned cross-dependencies. Read more about it on a [dedicated page](/packages/eslint-plugin/documents/enforce-module-boundaries)
|
||||
The `enforce-module-boundaries` ESLint rule enables you to define strict rules for accessing resources between different projects in the repository. Enforcing strict boundaries helps prevent unplanned cross-dependencies. Read more about it on a [dedicated page](/packages/eslint-plugin/documents/enforce-module-boundaries).
|
||||
|
||||
### Dependency Checks rule
|
||||
|
||||
The `@nx/dependency-checks` ESLint rule enables you to discover mismatches between dependencies specified in a project's `package.json` and the dependencies that your project actually depends on. Read more about it on a [dedicated page](/packages/eslint-plugin/documents/dependency-checks).
|
||||
|
||||
@@ -50,7 +50,7 @@ nx start my-app
|
||||
To generate a new library run:
|
||||
|
||||
```shell
|
||||
npx nx g @nx/react-native:lib your-lib-name
|
||||
npx nx g @nx/expo:lib your-lib-name
|
||||
```
|
||||
|
||||
### Generating Components
|
||||
@@ -58,7 +58,7 @@ npx nx g @nx/react-native:lib your-lib-name
|
||||
To generate a new component inside library run:
|
||||
|
||||
```shell
|
||||
npx nx g @nx/react-native:component your-component-name --project=your-lib-name --export
|
||||
npx nx g @nx/expo:component your-component-name --project=your-lib-name --export
|
||||
```
|
||||
|
||||
Replace `your-lib-name` with the app's name as defined in your `tsconfig.base.json` file or the `name` property of your `package.json`
|
||||
@@ -247,6 +247,28 @@ To check the details of your build status, run:
|
||||
nx build-list <app-name>
|
||||
```
|
||||
|
||||
### Submit an EAS Build
|
||||
|
||||
EAS Submit is a hosted service for uploading and submitting your app binaries to the app stores. Since it's a hosted service, you can submit your app to both stores as long as you can run EAS CLI on your machine.
|
||||
|
||||
To submit an EAS build:
|
||||
|
||||
```shell
|
||||
nx submit <app-name>
|
||||
```
|
||||
|
||||
### Update an EAS Build
|
||||
|
||||
EAS Update is a hosted service that serves updates for projects using the `expo-updates` library.
|
||||
|
||||
EAS Update makes fixing small bugs and pushing quick fixes a snap in between app store submissions. It accomplishes this by allowing an end-user's app to swap out the non-native parts of their app (for example, JS, styling, and image changes) with a new update that contains bug fixes and other updates.
|
||||
|
||||
To update an EAS build:
|
||||
|
||||
```shell
|
||||
nx update <app-name>
|
||||
```
|
||||
|
||||
### Testing Projects
|
||||
|
||||
You can run unit tests with:
|
||||
@@ -269,6 +291,8 @@ Below table is a map between expo commands and Nx commands:
|
||||
| `expo install` | `nx install <app-name>` |
|
||||
| `eas build` | `nx build <app-name>` |
|
||||
| `eas build:list` | `nx build-list <app-name>` |
|
||||
| `eas update` | `nx update <app-name>` |
|
||||
| `eas submit` | `nx submit <app-name>` |
|
||||
|
||||
## More Documentation
|
||||
|
||||
|
||||
@@ -46,7 +46,8 @@
|
||||
},
|
||||
"output": {
|
||||
"type": "string",
|
||||
"description": "Output path for local build"
|
||||
"description": "Output path for local build",
|
||||
"examples": ["../../dist/MyApp.tar.gz", "../../dist"]
|
||||
},
|
||||
"wait": {
|
||||
"type": "boolean",
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
"description": "Maximum number of tasks to allow Metro to spawn"
|
||||
},
|
||||
"dumpAssetmap": {
|
||||
"type": "string",
|
||||
"type": "boolean",
|
||||
"description": "Dump the asset map for further processing"
|
||||
},
|
||||
"dumpSourcemap": {
|
||||
"type": "string",
|
||||
"type": "boolean",
|
||||
"description": "Dump the source map for debugging the JS bundle"
|
||||
},
|
||||
"bundler": {
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
"type": "boolean",
|
||||
"description": "Syncs npm dependencies to package.json (for React Native autolink).",
|
||||
"default": true,
|
||||
"x-deprecated": "Add sync-deps to dependsOn in project.json for this target instead",
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"port": {
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
"sync": {
|
||||
"type": "boolean",
|
||||
"description": "Syncs npm dependencies to package.json (for React Native autolink).",
|
||||
"x-deprecated": "Add sync-deps to dependsOn in project.json for this target instead",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
{
|
||||
"name": "configuration",
|
||||
"factory": "./src/generators/configuration/configuration",
|
||||
"schema": {
|
||||
"$schema": "http://json-schema.org/schema",
|
||||
"$id": "NxJestProject",
|
||||
"cli": "nx",
|
||||
"title": "Add Jest Configuration to a project",
|
||||
"description": "Add Jest Configuration to a project.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The name of the project.",
|
||||
"$default": { "$source": "projectName" },
|
||||
"x-priority": "important"
|
||||
},
|
||||
"skipSetupFile": {
|
||||
"type": "boolean",
|
||||
"description": "Skips the setup file required for angular.",
|
||||
"default": false,
|
||||
"x-deprecated": "Use `--setup-file` instead."
|
||||
},
|
||||
"setupFile": {
|
||||
"type": "string",
|
||||
"enum": ["none", "angular", "web-components"],
|
||||
"description": "The setup file to be generated.",
|
||||
"default": "none",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"skipSerializers": {
|
||||
"type": "boolean",
|
||||
"description": "Skips the serializers required to snapshot angular templates.",
|
||||
"default": false
|
||||
},
|
||||
"supportTsx": {
|
||||
"type": "boolean",
|
||||
"description": "Setup `tsx` support.",
|
||||
"default": false,
|
||||
"x-priority": "important"
|
||||
},
|
||||
"testEnvironment": {
|
||||
"type": "string",
|
||||
"enum": ["jsdom", "node", "none"],
|
||||
"description": "The test environment for jest.",
|
||||
"default": "jsdom",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"compiler": {
|
||||
"type": "string",
|
||||
"enum": ["tsc", "babel", "swc"],
|
||||
"description": "The compiler to use for source and tests.",
|
||||
"default": "tsc"
|
||||
},
|
||||
"babelJest": {
|
||||
"type": "boolean",
|
||||
"alias": "babel-jest",
|
||||
"description": "Use `babel-jest` instead of `ts-jest`.",
|
||||
"x-deprecated": "Use `--compiler=babel` instead.",
|
||||
"default": false
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"skipPackageJson": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Do not add dependencies to `package.json`.",
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"js": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Use JavaScript instead of TypeScript for config files"
|
||||
}
|
||||
},
|
||||
"required": [],
|
||||
"presets": []
|
||||
},
|
||||
"description": "Add Jest configuration to a project.",
|
||||
"hidden": true,
|
||||
"implementation": "/packages/jest/src/generators/configuration/configuration.ts",
|
||||
"aliases": [],
|
||||
"path": "/packages/jest/src/generators/configuration/schema.json",
|
||||
"type": "generator"
|
||||
}
|
||||
@@ -14,18 +14,34 @@
|
||||
"type": "string",
|
||||
"description": "The name of the main entry-point file.",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "main@(.js|.ts|.tsx)"
|
||||
"x-completion-glob": "main@(.js|.ts|.tsx)",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"generateExportsField": {
|
||||
"type": "boolean",
|
||||
"alias": "exports",
|
||||
"description": "Update the output package.json file's 'exports' field. This field is used by Node and bundles.",
|
||||
"x-priority": "important",
|
||||
"default": false
|
||||
},
|
||||
"additionalEntryPoints": {
|
||||
"type": "array",
|
||||
"description": "Additional entry-points to add to exports field in the package.json file.",
|
||||
"items": { "type": "string" },
|
||||
"x-priority": "important"
|
||||
},
|
||||
"outputPath": {
|
||||
"type": "string",
|
||||
"description": "The output path of the generated files.",
|
||||
"x-completion-type": "directory"
|
||||
"x-completion-type": "directory",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"tsConfig": {
|
||||
"type": "string",
|
||||
"description": "The path to the Typescript configuration file.",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "tsconfig.*.json"
|
||||
"x-completion-glob": "tsconfig.*.json",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"swcrc": {
|
||||
"type": "string",
|
||||
@@ -98,13 +114,15 @@
|
||||
"updateBuildableProjectDepsInPackageJson": {
|
||||
"type": "boolean",
|
||||
"description": "Whether to update the buildable project dependencies in the build output package.json.",
|
||||
"default": true
|
||||
"default": false,
|
||||
"x-deprecated": "Configure the project to use the '@nx/dependency-checks' ESLint rule instead (https://nx.dev/packages/eslint-plugin/documents/dependency-checks). It will be removed in v17."
|
||||
},
|
||||
"buildableProjectDepsInPackageJsonType": {
|
||||
"type": "string",
|
||||
"description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.",
|
||||
"enum": ["dependencies", "peerDependencies"],
|
||||
"default": "peerDependencies"
|
||||
"default": "peerDependencies",
|
||||
"x-deprecated": "Configure the project to use the '@nx/dependency-checks' ESLint rule instead (https://nx.dev/packages/eslint-plugin/documents/dependency-checks). It will be removed in v17."
|
||||
},
|
||||
"external": {
|
||||
"description": "A list projects to be treated as external. This feature is experimental",
|
||||
|
||||
@@ -14,7 +14,21 @@
|
||||
"type": "string",
|
||||
"description": "The name of the main entry-point file.",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "main@(.js|.ts|.jsx|.tsx)"
|
||||
"x-completion-glob": "main@(.js|.ts|.jsx|.tsx)",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"generateExportsField": {
|
||||
"type": "boolean",
|
||||
"alias": "exports",
|
||||
"description": "Update the output package.json file's 'exports' field. This field is used by Node and bundles.",
|
||||
"default": false,
|
||||
"x-priority": "important"
|
||||
},
|
||||
"additionalEntryPoints": {
|
||||
"type": "array",
|
||||
"description": "Additional entry-points to add to exports field in the package.json file.",
|
||||
"items": { "type": "string" },
|
||||
"x-priority": "important"
|
||||
},
|
||||
"rootDir": {
|
||||
"type": "string",
|
||||
@@ -23,13 +37,15 @@
|
||||
"outputPath": {
|
||||
"type": "string",
|
||||
"description": "The output path of the generated files.",
|
||||
"x-completion-type": "directory"
|
||||
"x-completion-type": "directory",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"tsConfig": {
|
||||
"type": "string",
|
||||
"description": "The path to the Typescript configuration file.",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "tsconfig.*.json"
|
||||
"x-completion-glob": "tsconfig.*.json",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"assets": {
|
||||
"type": "array",
|
||||
@@ -98,13 +114,15 @@
|
||||
"updateBuildableProjectDepsInPackageJson": {
|
||||
"type": "boolean",
|
||||
"description": "Whether to update the buildable project dependencies in the build output package.json.",
|
||||
"default": true
|
||||
"default": false,
|
||||
"x-deprecated": "Configure the project to use the '@nx/dependency-checks' ESLint rule instead (https://nx.dev/packages/eslint-plugin/documents/dependency-checks). It will be removed in v17."
|
||||
},
|
||||
"buildableProjectDepsInPackageJsonType": {
|
||||
"type": "string",
|
||||
"description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.",
|
||||
"enum": ["dependencies", "peerDependencies"],
|
||||
"default": "peerDependencies"
|
||||
"default": "peerDependencies",
|
||||
"x-deprecated": "Configure the project to use the '@nx/dependency-checks' ESLint rule instead (https://nx.dev/packages/eslint-plugin/documents/dependency-checks). It will be removed in v17."
|
||||
},
|
||||
"external": {
|
||||
"description": "A list projects to be treated as external. This feature is experimental",
|
||||
@@ -172,7 +190,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Using TypeScript Transformer Plugins\" %}\n\n`@nx/js:tsc` can run the [TypeScript Transformers](https://github.com/madou/typescript-transformer-handbook) by using the `transformers` option.\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nx/js:tsc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"transformers\": [\n \"@nestjs/swagger/plugin\",\n {\n \"name\": \"@automapper/classes/transformer-plugin\",\n \"options\": {}\n }\n ]\n }\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Inline libraries\" %}\n\n`@nx/js:tsc` can inline non-buildable libraries by opt-in to **Inlining** mode with `external` option.\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nx/js:tsc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"external\": \"all\"\n }\n }\n}\n```\n\n```shell\nnpx nx build ts-lib --external=all\n```\n\n`@nx/js:tsc` can also inline buildable libraries by setting `external: 'none'`\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nx/js:tsc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"external\": \"none\"\n }\n }\n}\n```\n\n```shell\nnpx nx build ts-lib --external=none\n```\n\n{% /tab %}\n{% /tabs %}\n",
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Using TypeScript Transformer Plugins\" %}\n\n`@nx/js:tsc` can run the [TypeScript Transformers](https://github.com/madou/typescript-transformer-handbook) by using the `transformers` option.\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nx/js:tsc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"transformers\": [\n \"@nestjs/swagger/plugin\",\n {\n \"name\": \"@automapper/classes/transformer-plugin\",\n \"options\": {}\n }\n ]\n }\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Inline libraries\" %}\n\n`@nx/js:tsc` can inline non-buildable libraries by opt-in to **Inlining** mode with `external` option.\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nx/js:tsc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"external\": \"all\"\n }\n }\n}\n```\n\n```shell\nnpx nx build ts-lib --external=all\n```\n\n`@nx/js:tsc` can also inline buildable libraries by setting `external: 'none'`\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nx/js:tsc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"external\": \"none\"\n }\n }\n}\n```\n\n```shell\nnpx nx build ts-lib --external=none\n```\n\n{% /tab %}\n{% tab label=\"Batch mode execution\" %}\n\nThe `@nx/js:tsc` executor supports running multiple tasks in a single process. When running in batch mode, the executor uses the [TypeScript APIs for incremental builds](https://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript). This results in a much faster build time when compared to the default implementation (the bigger the task graph to run, the more the performance improvements).\n\n{% callout type=\"warning\" title=\"Experimental feature\" %}\nExecuting tasks in batch mode is an experimental feature.\n{% /callout %}\n\n{% callout type=\"info\" title=\"Requirements\" %}\nBuilding a project with the `@nx/js:tsc` executor in batch mode requires all dependent projects to be buildable and built using the `@nx/js:tsc` executor.\n{% /callout %}\n\nTo run your builds using the batch implementation, set the `NX_BATCH_MODE` environment variable to `true`:\n\n```shell\nNX_BATCH_MODE=true nx build ts-lib\n```\n\nFor optimal performance, you could set the `clean` option to `false`. Otherwise, the executor cleans the output folder before running the build, which results in the loss of the [`.tsbuildinfo` file](https://www.typescriptlang.org/tsconfig/#tsBuildInfoFile) and, consequently, the loss of important optimizations performed by TypeScript. This is not a requirement. Even if the `clean` option is not set to `false` there are other important optimizations that are performed by the batch implementation.\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nx/js:tsc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"clean\": false\n }\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n",
|
||||
"presets": []
|
||||
},
|
||||
"description": "Build a project using TypeScript.",
|
||||
|
||||
@@ -128,6 +128,11 @@
|
||||
"type": "string",
|
||||
"enum": ["off", "warn", "error"],
|
||||
"description": "The equivalent of the `--report-unused-disable-directives` flag on the ESLint CLI."
|
||||
},
|
||||
"printConfig": {
|
||||
"type": "string",
|
||||
"description": "The equivalent of the `--print-config` flag on the ESLint CLI.",
|
||||
"x-completion-type": "file"
|
||||
}
|
||||
},
|
||||
"required": ["lintFilePatterns"],
|
||||
|
||||
@@ -67,7 +67,7 @@ To make the library `publishable`, use the following command:
|
||||
nx g @nx/nest:lib my-nest-lib --publishable --importPath=@my-workspace/my-nest-lib
|
||||
```
|
||||
|
||||
> Read more about [building and publishing libraries here](/more-concepts/buildable-and-publishable-libraries).
|
||||
> Read more about [building and publishing libraries here](/concepts/more-concepts/buildable-and-publishable-libraries).
|
||||
|
||||
### Nest Generators
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@ Nx allows you to create libraries with just one command. Some reasons you might
|
||||
- Publish a package to be used outside the monorepo
|
||||
- Better visualize the architecture using `nx graph`
|
||||
|
||||
For more information on Nx libraries, see our documentation on [Creating Libraries](/more-concepts/creating-libraries)
|
||||
and [Library Types](/more-concepts/library-types).
|
||||
For more information on Nx libraries, see our documentation on [Creating Libraries](/concepts/more-concepts/creating-libraries)
|
||||
and [Library Types](/concepts/more-concepts/library-types).
|
||||
|
||||
To generate a new library run:
|
||||
|
||||
@@ -161,7 +161,7 @@ nx export my-new-app
|
||||
|
||||
Once you are ready to deploy your Next.js application, you have absolute freedom to choose any hosting provider that fits your needs.
|
||||
|
||||
You may know that the company behind Next.js, Vercel, has a great hosting platform offering that is developed in tandem with Next.js itself to offer a great overall developer and user experience. We have detailed [how to deploy your Next.js application to Vercel in a separate guide](/recipes/deployment/deploy-nextjs-to-vercel).
|
||||
You may know that the company behind Next.js, Vercel, has a great hosting platform offering that is developed in tandem with Next.js itself to offer a great overall developer and user experience. We have detailed [how to deploy your Next.js application to Vercel in a separate guide](/recipes/react/deploy-nextjs-to-vercel).
|
||||
|
||||
## More Documentation
|
||||
|
||||
|
||||
@@ -81,8 +81,9 @@
|
||||
},
|
||||
"e2eTestRunner": {
|
||||
"type": "string",
|
||||
"enum": ["cypress", "none"],
|
||||
"enum": ["cypress", "playwright", "none"],
|
||||
"description": "Test runner to use for end to end (E2E) tests.",
|
||||
"x-prompt": "Which E2E test runner would you like to use?",
|
||||
"default": "cypress"
|
||||
},
|
||||
"tags": {
|
||||
|
||||
@@ -79,6 +79,14 @@ Type: `boolean`
|
||||
|
||||
Generate a Dockerfile for the Node API
|
||||
|
||||
### e2eTestRunner
|
||||
|
||||
Type: `string`
|
||||
|
||||
Choices: [cypress, playwright, none]
|
||||
|
||||
Test runner to use for end to end (E2E) tests.
|
||||
|
||||
### framework
|
||||
|
||||
Type: `string`
|
||||
|
||||
@@ -61,6 +61,14 @@ Type: `boolean`
|
||||
|
||||
Set up distributed caching with Nx Cloud.
|
||||
|
||||
### useDotNxInstallation
|
||||
|
||||
Type: `boolean`
|
||||
|
||||
Default: `false`
|
||||
|
||||
Initialize an Nx workspace setup in the .nx directory of the current repository.
|
||||
|
||||
### version
|
||||
|
||||
Type: `boolean`
|
||||
|
||||
@@ -159,7 +159,7 @@ Show only projects that have a specific target
|
||||
|
||||
### project
|
||||
|
||||
Show a list of targets in the workspace.
|
||||
Shows resolved project configuration for a given project.
|
||||
|
||||
```shell
|
||||
nx show project <projectName>
|
||||
@@ -177,7 +177,7 @@ Show help
|
||||
|
||||
Type: `string`
|
||||
|
||||
Show targets for the given project
|
||||
Which project should be viewed?
|
||||
|
||||
##### version
|
||||
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
Playwright is a modern web test runner. With included features such as:
|
||||
|
||||
- Cross browser support, including mobile browsers
|
||||
- Multi tab, origin, and user support
|
||||
- Automatic waiting
|
||||
- Test generation
|
||||
- Screenshots and videos
|
||||
|
||||
## Setting Up Playwright
|
||||
|
||||
If the `@nx/playwright` package is not installed, install the version that matches your `nx` package version.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="npm" %}
|
||||
|
||||
```shell
|
||||
npm install --save-dev @nx/playwright
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="yarn" %}
|
||||
|
||||
```shell
|
||||
yarn add --dev @nx/playwright
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="pnpm" %}
|
||||
|
||||
```shell
|
||||
pnpm i -D @nx/playwright
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
## E2E Testing
|
||||
|
||||
By default, when creating a new frontend application, Nx will prompt for which e2e test runner to use. Select `playwright` or pass in the arg `--e2eTestRunner=playwright`
|
||||
|
||||
```shell
|
||||
nx g @nx/web:app frontend --e2eTestRunner=playwright
|
||||
```
|
||||
|
||||
### Add Playwright e2e to an existing project
|
||||
|
||||
To generate an E2E project for an existing project, run the following generator
|
||||
|
||||
```shell
|
||||
nx g @nx/playwright:configuration --project=your-app-name --project=your-app-name
|
||||
```
|
||||
|
||||
Optionally, you can use the `--webServerCommand` and `--webServerAddress` option, to auto setup the [web server option](https://playwright.dev/docs/test-webserver) in the playwright config
|
||||
|
||||
```shell
|
||||
nx g @nx/playwright:configuration --project=your-app-name --webServerCommand="npx serve your-project-name" --webServerAddress="http://localhost:4200"
|
||||
```
|
||||
|
||||
### Testing Applications
|
||||
|
||||
Run `nx e2e <your-app-name>` to execute e2e tests with Playwright
|
||||
|
||||
{% callout type="note" title="Selecting Specific Specs" %}
|
||||
|
||||
You can use the `--grep/-g` flag to glob for test files.
|
||||
You can use the `--grepInvert/-gv` flag to glob for files to _not_ run.
|
||||
|
||||
```bash
|
||||
# run the tests in the feat-a/ directory
|
||||
nx e2e frontend-e2e --grep="**feat-a/**"
|
||||
|
||||
# run everything except feat-a/ directory
|
||||
nx e2e frontend-e2e --grepInvert=**feat-a/**
|
||||
```
|
||||
|
||||
{% /callout %}
|
||||
|
||||
By default, Playwright will run in headless mode. You will have the result of all the tests and errors (if any) in your
|
||||
terminal. Test output such as reports, screenshots and videos, will be accessible in `dist/.playwright/apps/<your-app-name>/`. This can be configured with the `outputDir` configuration options.
|
||||
|
||||
{% callout type="note" title="Output Caching" %}
|
||||
If changing the output directory or report output, make sure to update the [target outputs](/concepts/how-caching-works#what-is-cached) so the artifacts are correctly cached
|
||||
{% /callout %}
|
||||
|
||||
### Watching for Changes
|
||||
|
||||
With, `nx e2e frontend-e2e --ui` Playwright will start in headed mode where you can see your application being tested.
|
||||
|
||||
From, there you can toggle on the watch icon which will rerun the tests when the spec file updates.
|
||||
|
||||
```shell
|
||||
nx e2e <your-app-name> --ui
|
||||
```
|
||||
|
||||
You can also use `--headed` flag to run Playwright where the browser can be seen without using the [Playwright UI](https://playwright.dev/docs/test-ui-mode)
|
||||
|
||||
### Specifying a Base Url
|
||||
|
||||
The `baseURL` property within the Playwright configuration can control where the tests visit by default.
|
||||
|
||||
```ts
|
||||
import { defineConfig } from '@playwright/test';
|
||||
|
||||
export default defineConfig({
|
||||
// Rest of your config...
|
||||
|
||||
// Run your local dev server before starting the tests
|
||||
webServer: {
|
||||
command: 'npx serve <your-app-name>',
|
||||
url: 'http://localhost:4200',
|
||||
reuseExistingServer: !process.env.CI,
|
||||
},
|
||||
use: {
|
||||
baseURL: 'http://localhost:4200', // url playwright visits with `await page.goto('/')`;
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
In order to set different `baseURL` values for different environments you can pass them via the [environment variables and nx configurations](/recipes/tips-n-tricks/define-environment-variables) or optionally via setting them per the environment they are needed in such as `CI`
|
||||
|
||||
```ts
|
||||
import { defineConfig } from '@playwright/test';
|
||||
|
||||
const baseUrl =
|
||||
process.env.BASE_URL ?? process.env.CI
|
||||
? 'https://some-staging-url.example.com'
|
||||
: 'http://localhost:4200';
|
||||
|
||||
export default defineConfig({
|
||||
// Rest of your config...
|
||||
|
||||
// Run your local dev server before starting the tests
|
||||
webServer: {
|
||||
command: 'npx serve <your-app-name>',
|
||||
url: baseUrl,
|
||||
reuseExistingServer: !process.env.CI,
|
||||
},
|
||||
use: {
|
||||
baseURL: baseUrl, // url playwright visits with `await page.goto('/')`;
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
By default Nx, provides a `nxE2EPreset` with predefined configuration for Playwright.
|
||||
|
||||
```ts
|
||||
import { defineConfig } from '@playwright/test';
|
||||
import { nxE2EPreset } from '@nx/playwright/preset';
|
||||
import { workspaceRoot } from '@nx/devkit';
|
||||
|
||||
// For CI, you may want to set BASE_URL to the deployed application.
|
||||
const baseURL = process.env['BASE_URL'] || 'http://localhost:4200';
|
||||
|
||||
/**
|
||||
* Read environment variables from file.
|
||||
* https://github.com/motdotla/dotenv
|
||||
*/
|
||||
// require('dotenv').config();
|
||||
|
||||
/**
|
||||
* See https://playwright.dev/docs/test-configuration.
|
||||
*/
|
||||
export default defineConfig({
|
||||
...nxE2EPreset(__filename, { testDir: './e2e' }),
|
||||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
||||
use: {
|
||||
baseURL,
|
||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||
trace: 'on-first-retry',
|
||||
},
|
||||
/* Run your local dev server before starting the tests */
|
||||
webServer: {
|
||||
command: 'npx nx serve <your-app-name>',
|
||||
url: baseURL,
|
||||
reuseExistingServer: !process.env.CI,
|
||||
cwd: workspaceRoot,
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
This preset sets up the `outputDir` and [HTML reporter](https://playwright.dev/docs/test-reporters#html-reporter) to output in `dist/.playwright/<path-to-project-root>` and sets up chromium, firefox, webkit browsers to be used a browser targets. If you want to use mobile and/or branded browsers you can pass those options into the preset function
|
||||
|
||||
```ts
|
||||
export default defineConfig({
|
||||
...nxE2EPreset(__filename, {
|
||||
testDir: './e2e',
|
||||
includeMobileBrowsers: true, // includes mobile Chrome and Safari
|
||||
includeBrandedBrowsers: true, // includes Google Chrome and Microsoft Edge
|
||||
}),
|
||||
// other settings
|
||||
});
|
||||
```
|
||||
|
||||
If you want to override any settings within the `nxE2EPreset`, You can define them after the preset like so
|
||||
|
||||
```ts
|
||||
const config = nxE2EPreset(__filename, {
|
||||
testDir: './e2e',
|
||||
includeMobileBrowsers: true, // includes mobile Chrome and Safari
|
||||
includeBrandedBrowsers: true, // includes Google Chrome and Microsoft Edge
|
||||
});
|
||||
export default defineConfig({
|
||||
...config
|
||||
retries: 3,
|
||||
reporters: [...config.reporters, /* other reporter settings */],
|
||||
});
|
||||
```
|
||||
|
||||
See the [Playwright configuration docs](https://playwright.dev/docs/test-configuration) for more options for Playwright.
|
||||
@@ -0,0 +1,168 @@
|
||||
{
|
||||
"name": "playwright",
|
||||
"implementation": "/packages/playwright/src/executors/playwright/playwright.ts",
|
||||
"schema": {
|
||||
"$schema": "http://json-schema.org/schema",
|
||||
"version": 2,
|
||||
"title": "Playwright executor",
|
||||
"description": "Run Playwright tests.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"browser": {
|
||||
"type": "string",
|
||||
"description": "Browser to use for tests, one of 'all', 'chromium', 'firefox' or 'webkit'. If a playwright config is provided/discovered then the browserName value is expected from the configured 'projects'",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"config": {
|
||||
"type": "string",
|
||||
"description": "Configuration file, or a test directory with optional",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "playwright?(*)@(.js|.cjs|.mjs|.ts|.cts|.mtx)",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"debug": {
|
||||
"type": "boolean",
|
||||
"description": "Run tests with Playwright Inspector. Shortcut for 'PWDEBUG=1' environment variable and '--timeout=0',--max-failures=1 --headed --workers=1' options"
|
||||
},
|
||||
"forbidOnly": {
|
||||
"type": "boolean",
|
||||
"description": "Fail if test.only is called"
|
||||
},
|
||||
"fullyParallel": {
|
||||
"type": "boolean",
|
||||
"description": "Run all tests in parallel"
|
||||
},
|
||||
"grep": {
|
||||
"alias": "g",
|
||||
"type": "string",
|
||||
"description": "Only run tests matching this regular expression"
|
||||
},
|
||||
"globalTimeout": {
|
||||
"type": "number",
|
||||
"description": "Maximum time this test suite can run in milliseconds"
|
||||
},
|
||||
"grepInvert": {
|
||||
"alias": "gv",
|
||||
"type": "string",
|
||||
"description": "Only run tests that do not match this regular expression"
|
||||
},
|
||||
"headed": {
|
||||
"type": "boolean",
|
||||
"description": "Run tests in headed browsers",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"ignoreSnapshots": {
|
||||
"type": "boolean",
|
||||
"description": "Ignore screenshot and snapshot expectations"
|
||||
},
|
||||
"workers": {
|
||||
"alias": "j",
|
||||
"type": "string",
|
||||
"description": "Number of concurrent workers or percentage of logical CPU cores, use 1 to run in a single worker"
|
||||
},
|
||||
"list": {
|
||||
"type": "boolean",
|
||||
"description": "Collect all the tests and report them, but do not run"
|
||||
},
|
||||
"maxFailures": {
|
||||
"alias": "x",
|
||||
"oneOf": [{ "type": "number" }, { "type": "boolean" }],
|
||||
"description": "Stop after the first N failures"
|
||||
},
|
||||
"noDeps": {
|
||||
"type": "boolean",
|
||||
"description": "Do not run project dependencies"
|
||||
},
|
||||
"output": {
|
||||
"type": "string",
|
||||
"description": "Folder for output artifacts"
|
||||
},
|
||||
"passWithNoTests": {
|
||||
"type": "boolean",
|
||||
"description": "Makes test run succeed even if no tests were found",
|
||||
"default": true
|
||||
},
|
||||
"project": {
|
||||
"description": "Only run tests from the specified list of projects",
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"quiet": {
|
||||
"alias": "q",
|
||||
"type": "boolean",
|
||||
"description": "Suppress stdio"
|
||||
},
|
||||
"repeatEach": {
|
||||
"type": "number",
|
||||
"description": "Run each test N times"
|
||||
},
|
||||
"reporter": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"list",
|
||||
"line",
|
||||
"dot",
|
||||
"json",
|
||||
"junit",
|
||||
"null",
|
||||
"github",
|
||||
"html",
|
||||
"blob"
|
||||
],
|
||||
"description": "Reporter to use, comma-separated, can be 'list', 'line', 'dot', 'json', 'junit', 'null', 'github', 'html', 'blob'. To configure reporter options, use the playwright configuration."
|
||||
},
|
||||
"retries": {
|
||||
"type": "number",
|
||||
"description": "Maximum retry count for flaky tests, zero for no retries"
|
||||
},
|
||||
"shard": {
|
||||
"type": "string",
|
||||
"description": "Shard tests and execute only the selected shard, specify in the form 'current/all', 1-based, for example '3/5'"
|
||||
},
|
||||
"timeout": {
|
||||
"type": "number",
|
||||
"description": "Specify test timeout threshold in milliseconds, zero for unlimited"
|
||||
},
|
||||
"trace": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"on",
|
||||
"off",
|
||||
"on-first-retry",
|
||||
"on-all-retries",
|
||||
"retain-on-failure"
|
||||
],
|
||||
"description": "Force tracing mode, can be 'on', 'off', 'on-first-retry', 'on-all-retries', 'retain-on-failure'"
|
||||
},
|
||||
"updateSnapshots": {
|
||||
"alias": "u",
|
||||
"type": "boolean",
|
||||
"description": "Update snapshots with actual results. Snapshots will be created if missing."
|
||||
},
|
||||
"ui": {
|
||||
"type": "boolean",
|
||||
"description": "Run tests in interactive UI mode"
|
||||
},
|
||||
"uiHost": {
|
||||
"type": "string",
|
||||
"description": "Host to serve UI on; specifying this option opens UI in a browser tab"
|
||||
},
|
||||
"uiPort": {
|
||||
"type": "string",
|
||||
"description": "Port to serve UI on, 0 for any free port; specifying this option opens UI in a browser tab"
|
||||
},
|
||||
"skipInstall": {
|
||||
"type": "boolean",
|
||||
"description": "Skip running playwright install before running playwright tests. This is to ensure that playwright browsers are installed before running tests.",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"required": [],
|
||||
"presets": []
|
||||
},
|
||||
"description": "Run Playwright tests.",
|
||||
"aliases": [],
|
||||
"hidden": false,
|
||||
"path": "/packages/playwright/src/executors/playwright/schema.json",
|
||||
"type": "executor"
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"name": "configuration",
|
||||
"factory": "./src/generators/configuration/configuration",
|
||||
"schema": {
|
||||
"$schema": "http://json-schema.org/schema",
|
||||
"$id": "NxPlaywrightConfiguration",
|
||||
"description": "Add a Playwright configuration.",
|
||||
"title": "Add a Playwright configuration",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The project to add a Playwright configuration to",
|
||||
"$default": { "$source": "projectName" },
|
||||
"x-priority": "important",
|
||||
"x-prompt": "What is the name of the project to set up Playwright for?"
|
||||
},
|
||||
"directory": {
|
||||
"type": "string",
|
||||
"description": "A directory where the project is placed relative from the project root",
|
||||
"x-priority": "important",
|
||||
"default": "playwright"
|
||||
},
|
||||
"js": {
|
||||
"type": "boolean",
|
||||
"description": "Generate JavaScript files rather than TypeScript files.",
|
||||
"default": false
|
||||
},
|
||||
"webServerCommand": {
|
||||
"type": "string",
|
||||
"description": "The command to start the web server."
|
||||
},
|
||||
"webServerAddress": {
|
||||
"type": "string",
|
||||
"description": "The address of the web server."
|
||||
},
|
||||
"linter": {
|
||||
"description": "The tool to use for running lint checks.",
|
||||
"type": "string",
|
||||
"enum": ["eslint", "none"],
|
||||
"default": "eslint"
|
||||
},
|
||||
"setParserOptionsProject": {
|
||||
"type": "boolean",
|
||||
"description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
|
||||
"default": false
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"skipPackageJson": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Do not add dependencies to `package.json`.",
|
||||
"x-priority": "internal"
|
||||
}
|
||||
},
|
||||
"required": ["project"],
|
||||
"presets": []
|
||||
},
|
||||
"description": "Add Nx Playwright configuration to your project",
|
||||
"implementation": "/packages/playwright/src/generators/configuration/configuration.ts",
|
||||
"aliases": [],
|
||||
"hidden": false,
|
||||
"path": "/packages/playwright/src/generators/configuration/schema.json",
|
||||
"type": "generator"
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "init",
|
||||
"factory": "./src/generators/init/init",
|
||||
"schema": {
|
||||
"$schema": "http://json-schema.org/schema",
|
||||
"$id": "NxPlaywrightInit",
|
||||
"title": "Playwright Init Generator",
|
||||
"description": "Initializes a Playwright project in the current workspace.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"skipPackageJson": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Do not add dependencies to `package.json`.",
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"skipInstall": {
|
||||
"type": "boolean",
|
||||
"description": "Skip running `playwright install`. This is to ensure that playwright browsers are installed.",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"required": [],
|
||||
"presets": []
|
||||
},
|
||||
"description": "Initializes a Playwright project in the current workspace",
|
||||
"implementation": "/packages/playwright/src/generators/init/init.ts",
|
||||
"aliases": [],
|
||||
"hidden": false,
|
||||
"path": "/packages/playwright/src/generators/init/schema.json",
|
||||
"type": "generator"
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
Nx plugins are npm packages that contain [generators](/plugin-features/use-code-generators) and [executors](/plugin-features/use-task-executors) to extend a Nx workspace.
|
||||
Nx plugins are npm packages that contain [generators](/core-features/plugin-features/use-code-generators) and [executors](/core-features/plugin-features/use-task-executors) to extend a Nx workspace.
|
||||
|
||||
This package contains tooling to help plugin authors create and maintain plugins.
|
||||
|
||||
For more information, see the [plugins](/plugins/intro/getting-started) section of docs.
|
||||
For more information, see the [plugins](/extending-nx/intro/getting-started) section of docs.
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"$id": "NxPluginCreatePackage",
|
||||
"title": "Create a framework package",
|
||||
"description": "Create a framework package that uses Nx CLI.",
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Basic executable\" %}\n\nCreate an executable that initializes an Nx workspace with {my-plugin}'s preset:\n\n```bash\nnx g @nx/plugin:create-package create-my-plugin --project my-plugin\n```\n\n{% /tab %}\n{% /tabs %}\n",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"$id": "NxPluginE2E",
|
||||
"title": "Create an E2E app for a Nx Plugin",
|
||||
"description": "Create an E2E app for a Nx Plugin.",
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"E2E Project\" %}\n\nScaffolds an E2E project for the plugin `my-plugin`.\n\n```bash\nnx g @nx/plugin:e2e-project --pluginName my-plugin --npmPackageName my-plugin --pluginOutputPath dist/my-plugin\n```\n\n{% /tab %}\n{% /tabs %}\n",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pluginName": {
|
||||
@@ -29,12 +30,6 @@
|
||||
"x-priority": "important"
|
||||
},
|
||||
"jestConfig": { "type": "string", "description": "Jest config file." },
|
||||
"standaloneConfig": {
|
||||
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"x-deprecated": "Nx only supports standaloneConfig"
|
||||
},
|
||||
"linter": {
|
||||
"description": "The tool to use for running lint checks.",
|
||||
"type": "string",
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"$id": "NxPluginExecutor",
|
||||
"title": "Create an Executor for an Nx Plugin",
|
||||
"description": "Create an Executor for an Nx Plugin.",
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Basic executor\" %}\n\nCreate a new executor called `build` inside the plugin `my-plugin`:\n\n```bash\nnx g @nx/plugin:executor build --project my-plugin\n```\n\n{% /tab %}\n{% tab label=\"With custom hashing\" %}\n\nCreate a new executor called `build` inside the plugin `my-plugin`, that uses a custom hashing function:\n\n```bash\nnx g @nx/plugin:executor build --project my-plugin --includeHasher\n```\n\n{% /tab %}\n{% /tabs %}\n",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"examples": [
|
||||
{
|
||||
"command": "nx g migration my-migration --project=my-plugin --version=1.0.0",
|
||||
"description": "Generate `libs/my-plugin/src/migrations/my-migration`"
|
||||
"description": "Adds a new migration to the project `my-plugin`, which will be triggered when migrating to version 1.0.0 or above from a previous version."
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
"title": "",
|
||||
"type": "object",
|
||||
"description": "Adds linting configuration to validate common json files for nx plugins.",
|
||||
"examples": [
|
||||
{
|
||||
"command": "nx g @nx/plugin:lint-checks",
|
||||
"description": "Sets up linting configuration to validate common json files for an nx plugin project."
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"projectName": {
|
||||
"type": "string",
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"examples": [
|
||||
{
|
||||
"command": "nx g plugin my-plugin --directory=plugins --importPath=@myorg/my-plugin",
|
||||
"description": "Generate `libs/plugins/my-plugin`"
|
||||
"description": "Generates an Nx plugin project called `plugins-my-plugin` at `libs/plugins/my-plugin`. The project will have an npm package name and import path of `@myorg/my-plugin`."
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
|
||||
@@ -7,6 +7,16 @@
|
||||
"$id": "NxPluginPreset",
|
||||
"title": "Generator ran by create-nx-plugin",
|
||||
"description": "Initializes a workspace with an nx-plugin inside of it. Use as: `create-nx-plugin` or `create-nx-workspace --preset @nx/nx-plugin`.",
|
||||
"examples": [
|
||||
{
|
||||
"command": "npx create-nx-plugin",
|
||||
"description": "Creates a new Nx workspace containing an Nx plugin."
|
||||
},
|
||||
{
|
||||
"command": "npx create-nx-workspace --preset @nx/plugin",
|
||||
"description": "Creates a new Nx workspace containing an Nx plugin."
|
||||
}
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pluginName": {
|
||||
|
||||
@@ -45,7 +45,8 @@
|
||||
"packager": {
|
||||
"type": "boolean",
|
||||
"description": "Launch packager while building",
|
||||
"default": true
|
||||
"default": true,
|
||||
"x-deprecated": "Run `nx run <project>:start` instead. Will be removed in Nx 17."
|
||||
},
|
||||
"port": {
|
||||
"type": "number",
|
||||
@@ -53,8 +54,10 @@
|
||||
"default": 8081
|
||||
},
|
||||
"tasks": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"oneOf": [
|
||||
{ "type": "array", "items": { "type": "string" } },
|
||||
{ "type": "string" }
|
||||
],
|
||||
"description": "Run custom Gradle tasks. By default it's \"assembleDebug\". Will override passed mode and variant arguments.",
|
||||
"examples": [
|
||||
"assembleDebug",
|
||||
@@ -71,8 +74,12 @@
|
||||
"default": false
|
||||
},
|
||||
"extraParams": {
|
||||
"type": "string",
|
||||
"description": "Custom params passed to gradle build command"
|
||||
"oneOf": [
|
||||
{ "type": "array", "items": { "type": "string" } },
|
||||
{ "type": "string" }
|
||||
],
|
||||
"description": "Custom params passed to gradle build command",
|
||||
"examples": ["-x lint -x test"]
|
||||
},
|
||||
"interactive": {
|
||||
"type": "boolean",
|
||||
@@ -81,7 +88,8 @@
|
||||
"sync": {
|
||||
"type": "boolean",
|
||||
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
|
||||
"default": true
|
||||
"default": true,
|
||||
"x-deprecated": "Add sync-deps to dependsOn instead"
|
||||
},
|
||||
"resetCache": {
|
||||
"type": "boolean",
|
||||
|
||||
@@ -11,11 +11,7 @@
|
||||
"presets": [
|
||||
{ "name": "Build iOS for a simulator", "keys": ["simulator"] },
|
||||
{ "name": "Build iOS for a device", "keys": ["device"] },
|
||||
{ "name": "Build iOS for a device with udid", "keys": ["udid"] },
|
||||
{
|
||||
"name": "Run `pod install` before building iOS app",
|
||||
"keys": ["install"]
|
||||
}
|
||||
{ "name": "Build iOS for a device with udid", "keys": ["udid"] }
|
||||
],
|
||||
"properties": {
|
||||
"simulator": {
|
||||
@@ -72,17 +68,22 @@
|
||||
"description": "Explicitly select which scheme and configuration to use before running a build"
|
||||
},
|
||||
"extraParams": {
|
||||
"type": "string",
|
||||
"oneOf": [
|
||||
{ "type": "array", "items": { "type": "string" } },
|
||||
{ "type": "string" }
|
||||
],
|
||||
"description": "Custom params that will be passed to xcodebuild command."
|
||||
},
|
||||
"install": {
|
||||
"type": "boolean",
|
||||
"description": "Runs `pod install` for native modules before building iOS app.",
|
||||
"x-deprecated": "Add pod-install to dependsOn in project.json for this target instead",
|
||||
"default": true
|
||||
},
|
||||
"sync": {
|
||||
"type": "boolean",
|
||||
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
|
||||
"x-deprecated": "Add sync-deps to dependsOn in project.json for this target instead",
|
||||
"default": true
|
||||
},
|
||||
"resetCache": {
|
||||
@@ -93,7 +94,8 @@
|
||||
"packager": {
|
||||
"type": "boolean",
|
||||
"description": "Launch packager while building",
|
||||
"default": true
|
||||
"default": true,
|
||||
"x-deprecated": "Run `nx run <project>:start` instead. Will be removed in Nx 17."
|
||||
}
|
||||
},
|
||||
"required": [],
|
||||
|
||||
@@ -12,9 +12,19 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"buildFolder": {
|
||||
"description": "Location for iOS build artifacts. Corresponds to Xcode's \"-derivedDataPath\". Relative to ios directory",
|
||||
"description": "Location for iOS build artifacts. Corresponds to Xcode's \"-derivedDataPath\". Relative to ios directory.",
|
||||
"type": "string",
|
||||
"default": "./build"
|
||||
},
|
||||
"repoUpdate": {
|
||||
"description": "Force running `pod repo update` before install.",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"deployment": {
|
||||
"description": "Disallow any changes to the Podfile or the Podfile.lock during installation.",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"required": ["buildFolder"],
|
||||
|
||||
@@ -77,8 +77,10 @@
|
||||
"default": 8081
|
||||
},
|
||||
"tasks": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"oneOf": [
|
||||
{ "type": "array", "items": { "type": "string" } },
|
||||
{ "type": "string" }
|
||||
],
|
||||
"description": "Run custom Gradle tasks. By default it's \"assembleDebug\". Will override passed mode and variant arguments.",
|
||||
"examples": [
|
||||
"assembleDebug",
|
||||
@@ -95,7 +97,10 @@
|
||||
"default": false
|
||||
},
|
||||
"extraParams": {
|
||||
"type": "string",
|
||||
"oneOf": [
|
||||
{ "type": "array", "items": { "type": "string" } },
|
||||
{ "type": "string" }
|
||||
],
|
||||
"description": "Custom params passed to gradle build command"
|
||||
},
|
||||
"interactive": {
|
||||
@@ -105,6 +110,7 @@
|
||||
"sync": {
|
||||
"type": "boolean",
|
||||
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
|
||||
"x-deprecated": "Add sync-deps to dependsOn for this target in project.json instead",
|
||||
"default": true
|
||||
},
|
||||
"resetCache": {
|
||||
|
||||
@@ -13,11 +13,7 @@
|
||||
"presets": [
|
||||
{ "name": "Run iOS on a simulator", "keys": ["simulator"] },
|
||||
{ "name": "Run iOS on a device", "keys": ["device"] },
|
||||
{ "name": "Run iOS on a device with udid", "keys": ["udid"] },
|
||||
{
|
||||
"name": "Run `pod install` before building iOS app",
|
||||
"keys": ["install"]
|
||||
}
|
||||
{ "name": "Run iOS on a device with udid", "keys": ["udid"] }
|
||||
],
|
||||
"properties": {
|
||||
"xcodeConfiguration": {
|
||||
@@ -81,17 +77,22 @@
|
||||
"description": "Explicitly select which scheme and configuration to use before running a build"
|
||||
},
|
||||
"extraParams": {
|
||||
"type": "string",
|
||||
"oneOf": [
|
||||
{ "type": "array", "items": { "type": "string" } },
|
||||
{ "type": "string" }
|
||||
],
|
||||
"description": "Custom params that will be passed to xcodebuild command."
|
||||
},
|
||||
"install": {
|
||||
"type": "boolean",
|
||||
"description": "Runs `pod install` for native modules before building iOS app.",
|
||||
"default": true
|
||||
"default": true,
|
||||
"x-deprecated": "Add `pod-install` to dependsOn for this target in project.json instead."
|
||||
},
|
||||
"sync": {
|
||||
"type": "boolean",
|
||||
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
|
||||
"x-deprecated": "Add `sync-deps` to dependsOn for this target in project.json instead.",
|
||||
"default": true
|
||||
},
|
||||
"resetCache": {
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
"tsConfiguration": {
|
||||
"type": "boolean",
|
||||
"description": "Configure your project with TypeScript. Generate main.ts and preview.ts files, instead of main.js and preview.js.",
|
||||
"default": false
|
||||
"default": true
|
||||
},
|
||||
"linter": {
|
||||
"description": "The tool to use for running lint checks.",
|
||||
|
||||
@@ -43,7 +43,7 @@ nx g @nx/react:lib my-new-lib \
|
||||
--importPath=@myorg/my-new-lib
|
||||
```
|
||||
|
||||
Read more about [building and publishing libraries here](/more-concepts/buildable-and-publishable-libraries).
|
||||
Read more about [building and publishing libraries here](/concepts/more-concepts/buildable-and-publishable-libraries).
|
||||
|
||||
### Creating Components
|
||||
|
||||
|
||||
@@ -111,8 +111,9 @@
|
||||
},
|
||||
"e2eTestRunner": {
|
||||
"type": "string",
|
||||
"enum": ["cypress", "none"],
|
||||
"enum": ["cypress", "playwright", "none"],
|
||||
"description": "Test runner to use for end to end (E2E) tests.",
|
||||
"x-prompt": "Which E2E test runner would you like to use?",
|
||||
"default": "cypress"
|
||||
},
|
||||
"tags": {
|
||||
|
||||
@@ -30,6 +30,12 @@
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"interactionTests": {
|
||||
"type": "boolean",
|
||||
"description": "Set up Storybook interaction tests.",
|
||||
"default": true,
|
||||
"x-priority": "important"
|
||||
}
|
||||
},
|
||||
"required": ["project", "componentPath"],
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"e2eTestRunner": {
|
||||
"description": "Adds the specified E2E test runner.",
|
||||
"type": "string",
|
||||
"enum": ["cypress", "none"],
|
||||
"enum": ["cypress", "playwright", "none"],
|
||||
"default": "cypress"
|
||||
},
|
||||
"skipFormat": {
|
||||
|
||||
@@ -19,14 +19,19 @@
|
||||
},
|
||||
"generateCypressSpecs": {
|
||||
"type": "boolean",
|
||||
"description": "Automatically generate `*.spec.ts` files in the cypress e2e app generated by the cypress-configure generator.",
|
||||
"x-prompt": "Do you want to generate Cypress specs as well?",
|
||||
"x-priority": "important"
|
||||
"description": "Automatically generate `*.spec.ts` files in the cypress e2e app generated by the cypress-configure generator."
|
||||
},
|
||||
"cypressProject": {
|
||||
"type": "string",
|
||||
"description": "The Cypress project to generate the stories under. This is inferred from `project` by default."
|
||||
},
|
||||
"interactionTests": {
|
||||
"type": "boolean",
|
||||
"description": "Set up Storybook interaction tests.",
|
||||
"x-prompt": "Do you want to set up Storybook interaction tests?",
|
||||
"x-priority": "important",
|
||||
"default": true
|
||||
},
|
||||
"js": {
|
||||
"type": "boolean",
|
||||
"description": "Generate JavaScript files rather than TypeScript files.",
|
||||
@@ -52,7 +57,7 @@
|
||||
}
|
||||
},
|
||||
"required": ["project"],
|
||||
"examplesFile": "This generator will generate stories for all your components in your project. The stories will be generated using [Component Story Format 3 (CSF3)](https://storybook.js.org/blog/storybook-csf3-is-here/).\n\n```bash\nnx g @nx/react:stories project-name\n```\n\nYou can read more about how this generator works, in the [Storybook for React overview page](/packages/storybook/documents/overview-react#auto-generate-stories).\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- Whether you want to `generateCypressSpecs`. If you choose `yes`, a test file is going to be generated in the project's Cypress e2e app for each of your components.\n\nYou must provide a `name` for the generator to work.\n\nThere are a number of other options available. Let's take a look at some examples.\n\n## Examples\n\n### Ignore certain paths when generating stories\n\n```bash\nnx g @nx/react:stories --name=ui --ignorePaths=libs/ui/src/not-stories/**,**/**/src/**/*.other.*\n```\n\nThis will generate stories for all the components in the `ui` project, except for the ones in the `libs/ui/src/not-stories` directory, and also for components that their file name is of the pattern `*.other.*`.\n\nThis is useful if you have a project that contains components that are not meant to be used in isolation, but rather as part of a larger component.\n\n### Generate stories using JavaScript instead of TypeScript\n\n```bash\nnx g @nx/react:stories --name=ui --js=true\n```\n\nThis will generate stories for all the components in the `ui` project using JavaScript instead of TypeScript. So, you will have `.stories.js` files next to your components.\n",
|
||||
"examplesFile": "This generator will generate stories for all your components in your project. The stories will be generated using [Component Story Format 3 (CSF3)](https://storybook.js.org/blog/storybook-csf3-is-here/).\n\n```bash\nnx g @nx/react:stories project-name\n```\n\nYou can read more about how this generator works, in the [Storybook for React overview page](/packages/storybook/documents/overview-react#auto-generate-stories).\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- Whether you want to set up [Storybook interaction tests](https://storybook.js.org/docs/angular/writing-tests/interaction-testing) (`interactionTests`). If you choose `yes`, a `play` function will be added to your stories, and all the necessary dependencies will be installed. You can read more about this in the [Nx Storybook interaction tests documentation page](/packages/storybook/documents/interaction-tests)..\n\nYou must provide a `name` for the generator to work.\n\nBy default, this generator will also set up [Storybook interaction tests](https://storybook.js.org/docs/angular/writing-tests/interaction-testing). If you don't want to set up Storybook interaction tests, you can pass the `--interactionTests=false` option, but it's not recommended.\n\nThere are a number of other options available. Let's take a look at some examples.\n\n## Examples\n\n### Ignore certain paths when generating stories\n\n```bash\nnx g @nx/react:stories --name=ui --ignorePaths=libs/ui/src/not-stories/**,**/**/src/**/*.other.*\n```\n\nThis will generate stories for all the components in the `ui` project, except for the ones in the `libs/ui/src/not-stories` directory, and also for components that their file name is of the pattern `*.other.*`.\n\nThis is useful if you have a project that contains components that are not meant to be used in isolation, but rather as part of a larger component.\n\n### Generate stories using JavaScript instead of TypeScript\n\n```bash\nnx g @nx/react:stories --name=ui --js=true\n```\n\nThis will generate stories for all the components in the `ui` project using JavaScript instead of TypeScript. So, you will have `.stories.js` files next to your components.\n",
|
||||
"presets": []
|
||||
},
|
||||
"description": "Create stories/specs for all components declared in an app or library.",
|
||||
|
||||
@@ -18,12 +18,17 @@
|
||||
"x-dropdown": "projects",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"interactionTests": {
|
||||
"type": "boolean",
|
||||
"description": "Set up Storybook interaction tests.",
|
||||
"x-prompt": "Do you want to set up Storybook interaction tests?",
|
||||
"x-priority": "important",
|
||||
"alias": ["configureTestRunner"],
|
||||
"default": true
|
||||
},
|
||||
"configureCypress": {
|
||||
"type": "boolean",
|
||||
"description": "Run the cypress-configure generator.",
|
||||
"x-prompt": "Configure a cypress e2e app to run against the storybook instance?",
|
||||
"default": true,
|
||||
"x-priority": "important"
|
||||
"description": "Run the cypress-configure generator."
|
||||
},
|
||||
"generateStories": {
|
||||
"type": "boolean",
|
||||
@@ -34,10 +39,7 @@
|
||||
},
|
||||
"generateCypressSpecs": {
|
||||
"type": "boolean",
|
||||
"description": "Automatically generate test files in the Cypress E2E app generated by the `cypress-configure` generator.",
|
||||
"x-prompt": "Automatically generate test files in the Cypress E2E app generated by the cypress-configure generator?",
|
||||
"default": true,
|
||||
"x-priority": "important"
|
||||
"description": "Automatically generate test files in the Cypress E2E app generated by the `cypress-configure` generator."
|
||||
},
|
||||
"configureStaticServe": {
|
||||
"type": "boolean",
|
||||
@@ -58,7 +60,7 @@
|
||||
"tsConfiguration": {
|
||||
"type": "boolean",
|
||||
"description": "Configure your project with TypeScript. Generate main.ts and preview.ts files, instead of main.js and preview.js.",
|
||||
"default": false
|
||||
"default": true
|
||||
},
|
||||
"linter": {
|
||||
"description": "The tool to use for running lint checks.",
|
||||
@@ -77,14 +79,10 @@
|
||||
"**/**/src/**/*.other.*",
|
||||
"libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts"
|
||||
]
|
||||
},
|
||||
"configureTestRunner": {
|
||||
"type": "boolean",
|
||||
"description": "Add a Storybook Test-Runner target."
|
||||
}
|
||||
},
|
||||
"required": ["name"],
|
||||
"examplesFile": "This generator will set up Storybook for your **React** project. You can also use this generator to generate Storybook configuration for your **Next.js** project. By default, starting Nx 16, Storybook v7 is used.\n\n```bash\nnx g @nx/react:storybook-configuration project-name\n```\n\nYou can read more about how this generator works, in the [Storybook for React overview page](/packages/storybook/documents/overview-react#generate-storybook-configuration-for-an-react-project).\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- Whether you want to `configureCypress`. If you choose `yes`, a Cypress e2e app will be created (or configured) to run against the project's Storybook instance. You can read more about this in the [Storybook for React - Cypress section](/packages/storybook/documents/overview-react#cypress-tests-for-stories).\n- Whether you want to `generateStories` for the components in your project. If you choose `yes`, a `.stories.ts` file will be generated next to each of your components in your project.\n- Whether you want to `generateCypressSpecs`. If you choose `yes`, a test file is going to be generated in the project's Cypress e2e app for each of your components.\n- Whether you want to `configureTestRunner`. If you choose `yes`, a `test-storybook` target will be generated in your project's `project.json`, with a command to invoke the [Storybook `test-runner`](https://storybook.js.org/docs/react/writing-tests/test-runner).\n\nYou must provide a `name` for the generator to work.\n\nThere are a number of other options available. Let's take a look at some examples.\n\n## Examples\n\n### Generate Storybook configuration\n\n```bash\nnx g @nx/react:storybook-configuration ui\n```\n\nThis will generate Storybook configuration for the `ui` project.\n\n### Generate Storybook configuration using TypeScript\n\n```bash\nnx g @nx/react:storybook-configuration ui --tsConfiguration=true\n```\n\nThis will generate Storybook configuration for the `ui` project using TypeScript for the Storybook configuration files (the files inside the `.storybook` directory, eg. `.storybook/main.ts`).\n\n### Ignore certain paths when generating stories\n\n```bash\nnx g @nx/react:storybook-configuration ui --generateStories=true --ignorePaths=libs/ui/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts\n```\n\nThis will generate a Storybook configuration for the `ui` project and generate stories for all components in the `libs/ui/src/lib` directory, except for the ones in the `libs/ui/src/not-stories` directory, and the ones in the `apps/my-app` directory that end with `.something.ts`, and also for components that their file name is of the pattern `*.other.*`.\n\nThis is useful if you have a project that contains components that are not meant to be used in isolation, but rather as part of a larger component.\n\n### Generate stories using JavaScript instead of TypeScript\n\n```bash\nnx g @nx/react:storybook-configuration ui --generateStories=true --js=true\n```\n\nThis will generate stories for all the components in the `ui` project using JavaScript instead of TypeScript. So, you will have `.stories.js` files next to your components.\n",
|
||||
"examplesFile": "This generator will set up Storybook for your **React** project. You can also use this generator to generate Storybook configuration for your **Next.js** project. By default, starting Nx 16, Storybook v7 is used.\n\n```bash\nnx g @nx/react:storybook-configuration project-name\n```\n\nYou can read more about how this generator works, in the [Storybook for React overview page](/packages/storybook/documents/overview-react#generate-storybook-configuration-for-an-react-project).\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- Whether you want to set up [Storybook interaction tests](https://storybook.js.org/docs/react/writing-tests/interaction-testing) (`interactionTests`). If you choose `yes`, a `play` function will be added to your stories, and all the necessary dependencies will be installed. Also, a `test-storybook` target will be generated in your project's `project.json`, with a command to invoke the [Storybook `test-runner`](https://storybook.js.org/docs/react/writing-tests/test-runner). You can read more about this in the [Nx Storybook interaction tests documentation page](/packages/storybook/documents/interaction-tests)..\n- Whether you want to `generateStories` for the components in your project. If you choose `yes`, a `.stories.ts` file will be generated next to each of your components in your project.\n\nYou must provide a `name` for the generator to work.\n\nBy default, this generator will also set up [Storybook interaction tests](https://storybook.js.org/docs/react/writing-tests/interaction-testing). If you don't want to set up Storybook interaction tests, you can pass the `--interactionTests=false` option, but it's not recommended.\n\nThere are a number of other options available. Let's take a look at some examples.\n\n## Examples\n\n### Generate Storybook configuration\n\n```bash\nnx g @nx/react:storybook-configuration ui\n```\n\nThis will generate Storybook configuration for the `ui` project using TypeScript for the Storybook configuration files (the files inside the `.storybook` directory, eg. `.storybook/main.ts`).\n\n### Ignore certain paths when generating stories\n\n```bash\nnx g @nx/react:storybook-configuration ui --generateStories=true --ignorePaths=libs/ui/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts\n```\n\nThis will generate a Storybook configuration for the `ui` project and generate stories for all components in the `libs/ui/src/lib` directory, except for the ones in the `libs/ui/src/not-stories` directory, and the ones in the `apps/my-app` directory that end with `.something.ts`, and also for components that their file name is of the pattern `*.other.*`.\n\nThis is useful if you have a project that contains components that are not meant to be used in isolation, but rather as part of a larger component.\n\n### Generate stories using JavaScript instead of TypeScript\n\n```bash\nnx g @nx/react:storybook-configuration ui --generateStories=true --js=true\n```\n\nThis will generate stories for all the components in the `ui` project using JavaScript instead of TypeScript. So, you will have `.stories.js` files next to your components.\n\n### Generate Storybook configuration using JavaScript\n\n```bash\nnx g @nx/react:storybook-configuration ui --tsConfiguration=false\n```\n\nBy default, our generator generates TypeScript Storybook configuration files. You can choose to use JavaScript for the Storybook configuration files of your project (the files inside the `.storybook` directory, eg. `.storybook/main.js`).\n",
|
||||
"presets": []
|
||||
},
|
||||
"description": "Set up storybook for a React app or library.",
|
||||
|
||||
@@ -8,19 +8,6 @@
|
||||
"description": "Packages a library for different web usages (ESM, CommonJS).",
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"presets": [
|
||||
{
|
||||
"name": "Including Dependencies in package.json",
|
||||
"keys": [
|
||||
"main",
|
||||
"outputPath",
|
||||
"project",
|
||||
"tsConfig",
|
||||
"buildableProjectDepsInPackageJsonType",
|
||||
"updateBuildableProjectDepsInPackageJson"
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"project": {
|
||||
"type": "string",
|
||||
@@ -84,13 +71,15 @@
|
||||
"updateBuildableProjectDepsInPackageJson": {
|
||||
"type": "boolean",
|
||||
"description": "Update buildable project dependencies in `package.json`.",
|
||||
"default": true
|
||||
"default": false,
|
||||
"x-deprecated": "Configure the project to use the '@nx/dependency-checks' ESLint rule instead (https://nx.dev/packages/eslint-plugin/documents/dependency-checks). It will be removed in v17."
|
||||
},
|
||||
"buildableProjectDepsInPackageJsonType": {
|
||||
"type": "string",
|
||||
"description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.",
|
||||
"enum": ["dependencies", "peerDependencies"],
|
||||
"default": "peerDependencies"
|
||||
"default": "peerDependencies",
|
||||
"x-deprecated": "Configure the project to use the '@nx/dependency-checks' ESLint rule instead (https://nx.dev/packages/eslint-plugin/documents/dependency-checks). It will be removed in v17."
|
||||
},
|
||||
"rollupConfig": {
|
||||
"oneOf": [
|
||||
@@ -162,8 +151,16 @@
|
||||
},
|
||||
"generateExportsField": {
|
||||
"type": "boolean",
|
||||
"description": "Generate package.json with 'exports' field. This field defines entry points in the package and is used by Node and the TypeScript compiler.",
|
||||
"default": false
|
||||
"alias": "exports",
|
||||
"description": "Update the output package.json file's 'exports' field. This field is used by Node and bundles.",
|
||||
"default": false,
|
||||
"x-priority": "important"
|
||||
},
|
||||
"additionalEntryPoints": {
|
||||
"type": "array",
|
||||
"description": "Additional entry-points to add to exports field in the package.json file.",
|
||||
"items": { "type": "string" },
|
||||
"x-priority": "important"
|
||||
},
|
||||
"skipTypeCheck": {
|
||||
"type": "boolean",
|
||||
@@ -203,7 +200,8 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"examplesFile": "{% tabs %}\n{% tab label=\"Including Dependencies\" %}\nTo include dependencies in the output `package.json`, the dependencies must be installed as a **dependencies** in the root `package.json`\n\n```json {% fileName=\"package.json\" %}\n{\n \"dependencies\": {\n \"some-dependency\": \"^1.0.0\"\n }\n}\n```\n\nTo have dependencies in the be listed in the final `package.json` of your project, set the `updateBuildableProjectDepsInPackageJson` option to `true`. After than dependencies will be added to the `peerDependencies` field of the output `package.json`. You can use `buildableProjectDepsInPackageJsonType` option to change which field the dependencies are output to.\n\n```json {% fileName=\"project.json\" %}\n{\n \"targets\": {\n \"build\": {\n \"executor\": \"@nx/rollup:rollup\",\n \"options\": {\n \"buildableProjectDepsInPackageJsonType\": \"dependencies\",\n \"updateBuildableProjectDepsInPackageJson\": true\n }\n }\n }\n}\n```\n\n{% /tab %}\n\n{% tab label=\"Using `babelUpwardRootMode`\" %}\n\nCopying from the [Babel documentation](https://babeljs.io/docs/config-files#root-babelconfigjson-file):\n\n> [...] if you are running your Babel compilation process from within a subpackage, you need to tell Babel where to look for the config. There are a few ways to do that, but the recommended way is the \"rootMode\" option with \"upward\", which will make Babel search from the working directory upward looking for your babel.config.json file, and will use its location as the \"root\" value.\n\nSetting `babelUpwardRootMode` to `true` in your `project.json` will set `rootMode` option to `upward` in the Babel config. You may want the `upward` mode in a monorepo when projects must apply their individual `.babelrc` file. We recommend that you don't set it at all, so it will use the default to `false` as the `upward` mode brings additional complexity to the build process.\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n \"build\": {\n \"executor\": \"@nx/rollup:rollup\",\n \"options\": {\n \"babelUpwardRootMode\": true,\n //...\n },\n //...\n },\n //...\n },\n //...\n}\n```\n\nWhen `babelUpwardRootMode` is `true`, Babel will look for a root `babel.config.json` at the root of the workspace, which should look something like this to include all packages:\n\n```json\n{ \"babelrcRoots\": [\"*\"] }\n```\n\nThen for each package, you must have a `.babelrc` file that will be applied to that package. For example:\n\n```json\n{\n \"presets\": [\"@babel/preset-env\", \"@babel/preset-typescript\"]\n}\n```\n\nAll packages will use its own `.babelrc` file, thus you must ensure the right presets and plugins are set in each config file. This behavior can lead to build discrepancies between packages, so we recommend that you don't set `babelUpwardRootMode` at all.\n\n```treeview\n├── packages\n│ ├── a\n│ │ └── .babelrc\n│ └── b\n│ └── .babelrc\n└── babel.config.json\n```\n\nIn workspace above, if `a` imports `b`, it will apply the config `packages/b/.babelrc` and not apply its own `packages/a/.babelrc` to `b`. Anything in `babel.config.json` will apply to all packages.\n\n{% /tab %}\n\n{% /tabs %}\n"
|
||||
"examplesFile": "{% tabs %}\n{% tab label=\"Including Dependencies\" %}\nTo include dependencies in the output `package.json`, the dependencies must be installed as a **dependencies** in the root `package.json`\n\n```json {% fileName=\"package.json\" %}\n{\n \"dependencies\": {\n \"some-dependency\": \"^1.0.0\"\n }\n}\n```\n\nTo have dependencies in the be listed in the final `package.json` of your project, set the `updateBuildableProjectDepsInPackageJson` option to `true`. After than dependencies will be added to the `peerDependencies` field of the output `package.json`. You can use `buildableProjectDepsInPackageJsonType` option to change which field the dependencies are output to.\n\n```json {% fileName=\"project.json\" %}\n{\n \"targets\": {\n \"build\": {\n \"executor\": \"@nx/rollup:rollup\",\n \"options\": {\n \"buildableProjectDepsInPackageJsonType\": \"dependencies\",\n \"updateBuildableProjectDepsInPackageJson\": true\n }\n }\n }\n}\n```\n\n{% /tab %}\n\n{% tab label=\"Using `babelUpwardRootMode`\" %}\n\nCopying from the [Babel documentation](https://babeljs.io/docs/config-files#root-babelconfigjson-file):\n\n> [...] if you are running your Babel compilation process from within a subpackage, you need to tell Babel where to look for the config. There are a few ways to do that, but the recommended way is the \"rootMode\" option with \"upward\", which will make Babel search from the working directory upward looking for your babel.config.json file, and will use its location as the \"root\" value.\n\nSetting `babelUpwardRootMode` to `true` in your `project.json` will set `rootMode` option to `upward` in the Babel config. You may want the `upward` mode in a monorepo when projects must apply their individual `.babelrc` file. We recommend that you don't set it at all, so it will use the default to `false` as the `upward` mode brings additional complexity to the build process.\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n \"build\": {\n \"executor\": \"@nx/rollup:rollup\",\n \"options\": {\n \"babelUpwardRootMode\": true,\n //...\n },\n //...\n },\n //...\n },\n //...\n}\n```\n\nWhen `babelUpwardRootMode` is `true`, Babel will look for a root `babel.config.json` at the root of the workspace, which should look something like this to include all packages:\n\n```json\n{ \"babelrcRoots\": [\"*\"] }\n```\n\nThen for each package, you must have a `.babelrc` file that will be applied to that package. For example:\n\n```json\n{\n \"presets\": [\"@babel/preset-env\", \"@babel/preset-typescript\"]\n}\n```\n\nAll packages will use its own `.babelrc` file, thus you must ensure the right presets and plugins are set in each config file. This behavior can lead to build discrepancies between packages, so we recommend that you don't set `babelUpwardRootMode` at all.\n\n```treeview\n├── packages\n│ ├── a\n│ │ └── .babelrc\n│ └── b\n│ └── .babelrc\n└── babel.config.json\n```\n\nIn workspace above, if `a` imports `b`, it will apply the config `packages/b/.babelrc` and not apply its own `packages/a/.babelrc` to `b`. Anything in `babel.config.json` will apply to all packages.\n\n{% /tab %}\n\n{% /tabs %}\n",
|
||||
"presets": []
|
||||
},
|
||||
"description": "Bundle a package using Rollup.",
|
||||
"aliases": [],
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"name": "configuration",
|
||||
"aliases": ["rollup-project"],
|
||||
"factory": "./src/generators/configuration/configuration",
|
||||
"schema": {
|
||||
"$schema": "http://json-schema.org/schema",
|
||||
"$id": "NxRollupProject",
|
||||
"cli": "nx",
|
||||
"title": "Add Rollup Configuration to a project",
|
||||
"description": "Add Rollup Configuration to a project.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The name of the project.",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-dropdown": "project",
|
||||
"x-prompt": "What is the name of the project to set up a rollup for?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"compiler": {
|
||||
"type": "string",
|
||||
"enum": ["babel", "swc", "tsc"],
|
||||
"description": "The compiler to use to build source.",
|
||||
"default": "babel"
|
||||
},
|
||||
"main": {
|
||||
"type": "string",
|
||||
"description": "Path relative to the workspace root for the main entry file. Defaults to '<projectRoot>/src/main.ts'.",
|
||||
"alias": "entryFile",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"tsConfig": {
|
||||
"type": "string",
|
||||
"description": "Path relative to the workspace root for the tsconfig file to build with. Defaults to '<projectRoot>/tsconfig.app.json'.",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"skipPackageJson": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Do not add dependencies to `package.json`.",
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"skipValidation": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Do not perform any validation on existing project.",
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"importPath": {
|
||||
"type": "string",
|
||||
"description": "The library name used to import it, like `@myorg/my-awesome-lib`."
|
||||
},
|
||||
"external": {
|
||||
"type": "array",
|
||||
"description": "A list of external modules that will not be bundled (`react`, `react-dom`, etc.).",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"rollupConfig": {
|
||||
"type": "string",
|
||||
"description": "Path relative to workspace root to a custom rollup file that takes a config object and returns an updated config."
|
||||
},
|
||||
"buildTarget": {
|
||||
"description": "The build target to add.",
|
||||
"type": "string",
|
||||
"default": "build"
|
||||
}
|
||||
},
|
||||
"required": [],
|
||||
"presets": []
|
||||
},
|
||||
"description": "Add rollup configuration to a project.",
|
||||
"hidden": true,
|
||||
"implementation": "/packages/rollup/src/generators/configuration/configuration.ts",
|
||||
"path": "/packages/rollup/src/generators/configuration/schema.json",
|
||||
"type": "generator"
|
||||
}
|
||||
@@ -91,7 +91,7 @@ In the following section, we are going to see how to set up Storybook in these c
|
||||
|
||||
### Philosophy
|
||||
|
||||
Setting up Storybook on Nx reflects - and takes advantage of - the [mental model](/concepts/mental-model) of Nx, and especially the architecture of [Applications and Libraries](/more-concepts/applications-and-libraries). What that means, in essence, is that you still maintain the individual Storybook instances (per project) which you use for testing and local development, but you also keep one extra “container” for publishing, that serves as a single entry point. Let’s see this in more detail.
|
||||
Setting up Storybook on Nx reflects - and takes advantage of - the [mental model](/concepts/mental-model) of Nx, and especially the architecture of [Applications and Libraries](/concepts/more-concepts/applications-and-libraries). What that means, in essence, is that you still maintain the individual Storybook instances (per project) which you use for testing and local development, but you also keep one extra “container” for publishing, that serves as a single entry point. Let’s see this in more detail.
|
||||
|
||||
#### Local development and testing
|
||||
|
||||
@@ -121,7 +121,7 @@ Since each Storybook, in this case, is attached to a project, so is the serving
|
||||
|
||||
#### Publishing
|
||||
|
||||
When you are publishing your Storybook, you can follow the same principles described in the [Applications and Libraries Mental Model](/more-concepts/applications-and-libraries#mental-model) documentation page. The general idea is to have one central Storybook container, into which you are going to gather your stories from multiple libraries.
|
||||
When you are publishing your Storybook, you can follow the same principles described in the [Applications and Libraries Mental Model](/concepts/more-concepts/applications-and-libraries#mental-model) documentation page. The general idea is to have one central Storybook container, into which you are going to gather your stories from multiple libraries.
|
||||
|
||||
You can think of the central Storybook container as a grouping of similar-concept or same-scope UI parts of your workspace. In the same way you are scoping libraries, you can group your stories as well.
|
||||
|
||||
@@ -131,7 +131,7 @@ Then, according to your use-case, you can have one central Storybook for your wh
|
||||
In order to achieve some things mentioned above, you may use [Storybook Composition](/packages/storybook/documents/storybook-composition-setup). However, in this case, you would still need to build each project’s Storybook individually, and also deploy it individually. So in the cases where you have multiple projects, Storybook Composition would not be very efficient.
|
||||
{% /callout %}
|
||||
|
||||
Before moving on to the examples section, it could be useful to read the [Library Types](/more-concepts/library-types) documentation page and the [Grouping libraries](/more-concepts/grouping-libraries) documentation page. These could help you decide which way fits your use case better.
|
||||
Before moving on to the examples section, it could be useful to read the [Library Types](/concepts/more-concepts/library-types) documentation page and the [Grouping libraries](/concepts/more-concepts/grouping-libraries) documentation page. These could help you decide which way fits your use case better.
|
||||
|
||||
## Examples / Use cases
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ async viteFinal(config, { configType }) {
|
||||
In the `viteFinal` case, you would have to import the `mergeConfig` function from `vite`. So, on the top of your root `.storybook/main.js|ts` file, you would have to add:
|
||||
|
||||
```ts {% fileName=".storybook/main.js" %}
|
||||
const { mergeConfig } = require('vite');
|
||||
import { mergeConfig } from 'vite';
|
||||
```
|
||||
|
||||
## Project-specific configuration
|
||||
@@ -57,7 +57,7 @@ const { mergeConfig } = require('vite');
|
||||
You can customize the `webpack` configuration for a specific project by adding a `webpackFinal` field in your project-specific `.storybok/main.js|ts` file, like this:
|
||||
|
||||
```ts {% fileName="apps/my-react-webpack-app/.storybook/main.js" %}
|
||||
module.exports = {
|
||||
export default {
|
||||
...
|
||||
webpackFinal: async (config, { configType }) => {
|
||||
|
||||
@@ -71,9 +71,9 @@ module.exports = {
|
||||
If you are using a global, root-level, `webpack` configuration in your project, you can customize or extend that for a specific project like this:
|
||||
|
||||
```ts {% fileName="apps/my-react-webpack-app/.storybook/main.js" %}
|
||||
const rootMain = require('../../../.storybook/main');
|
||||
import rootMain from '../../../.storybook/main';
|
||||
|
||||
module.exports = {
|
||||
export default {
|
||||
...rootMain,
|
||||
...
|
||||
webpackFinal: async (config, { configType }) => {
|
||||
@@ -96,10 +96,10 @@ Take note how, in this case, we are first applying the global `webpack` configur
|
||||
You can customize the `vite` configuration for a specific project by adding a `viteFinal` field in your project-specific `.storybok/main.js|ts` file, like this:
|
||||
|
||||
```ts {% fileName="apps/my-react-vite-app/.storybook/main.js" %}
|
||||
const { mergeConfig } = require('vite');
|
||||
const viteTsConfigPaths = require('vite-tsconfig-paths').default;
|
||||
import { mergeConfig } from 'vite';
|
||||
import viteTsConfigPaths from 'vite-tsconfig-paths';
|
||||
|
||||
module.exports = {
|
||||
export default {
|
||||
...
|
||||
async viteFinal(config, { configType }) {
|
||||
return mergeConfig(config, {
|
||||
@@ -112,10 +112,10 @@ module.exports = {
|
||||
If you are using a global, root-level, `vite` configuration in your workspace, you can customize or extend that for a specific project like this:
|
||||
|
||||
```ts {% fileName="apps/my-react-vite-app/.storybook/main.js" %}
|
||||
const { mergeConfig } = require('vite');
|
||||
const rootMain = require('../../../.storybook/main');
|
||||
import { mergeConfig } from 'vite';
|
||||
import rootMain from '../../../.storybook/main';
|
||||
|
||||
module.exports = {
|
||||
export default {
|
||||
...
|
||||
async viteFinal(config, { configType }) {
|
||||
return mergeConfig(config, {
|
||||
@@ -128,9 +128,9 @@ module.exports = {
|
||||
So, a full project-level `.storybook/main.js|ts` file for a Vite.js project would look like this:
|
||||
|
||||
```ts {% fileName="apps/my-react-vite-app/.storybook/main.js" %}
|
||||
const { mergeConfig } = require('vite');
|
||||
import { mergeConfig } from 'vite';
|
||||
|
||||
module.exports = {
|
||||
export default {
|
||||
stories: ['../src/app/**/*.stories.@(mdx|js|jsx|ts|tsx)'],
|
||||
addons: ['@storybook/addon-essentials'],
|
||||
framework: {
|
||||
|
||||
@@ -14,7 +14,7 @@ Nx 12.7 comes with a dedicated Storybook addon for React which dramatically simp
|
||||
{% youtube
|
||||
src="https://www.youtube.com/embed/oUE74McS_NY"
|
||||
title="New in Nx 12.7: React Storybook Preset"
|
||||
width="100%" /%}
|
||||
/%}
|
||||
|
||||
Here are the main differences to the previous versions of Nx:
|
||||
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
---
|
||||
title: Setting up Storybook Interaction Tests with Nx
|
||||
description: This guide explains how you can set up Storybook interaction tests on your Nx workspace.
|
||||
---
|
||||
|
||||
# Setting up Storybook Interaction Tests with Nx
|
||||
|
||||
[Storybook interaction tests](https://storybook.js.org/docs/react/writing-tests/interaction-testing) allow you to test user interactions within your Storybook stories. It enhances your [Storybook](https://storybook.js.org/) setup, ensuring that not only do your components look right, but they also work correctly when interacted with.
|
||||
|
||||
You can read more about Storybook interaction tests in the following sections of the Storybook documentation:
|
||||
|
||||
- [Storybook interaction tests for React](https://storybook.js.org/docs/react/writing-tests/interaction-testing)
|
||||
- [Storybook interaction tests for Angular](https://storybook.js.org/docs/angular/writing-tests/interaction-testing)
|
||||
- [Storybook test runner](https://storybook.js.org/docs/react/writing-tests/test-runner)
|
||||
- [The `play` function](https://storybook.js.org/docs/react/writing-stories/play-function)
|
||||
|
||||
{% callout type="warning" title="Set up Storybook in your workspace" %}
|
||||
You first need to set up Storybook for your Nx workspace, if you haven't already. You can read the [Storybook plugin overview guide](/packages/storybook) to get started.
|
||||
{% /callout %}
|
||||
|
||||
## Setup Storybook Interaction Tests
|
||||
|
||||
During the setup, you'll be prompted about setting up interaction tests. Choose `yes` when asked if you want to set up Storybook interaction tests.
|
||||
|
||||
The `--interactionTests` flag is true by default, so when you're setting up Storybook, you can just press enter to accept the default value, or even pass the flag directly. Make sure to use the framework-specific generators, so that you also get your stories set up correctly:
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Angular" %}
|
||||
|
||||
```shell
|
||||
nx g @nx/angular:storybook-configuration project-name --interactionTests=true
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="React" %}
|
||||
|
||||
```shell
|
||||
nx g @nx/react:storybook-configuration project-name --interactionTests=true
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="No framework" %}
|
||||
|
||||
```shell
|
||||
nx g @nx/storybook:configuration project-name --interactionTests=true
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
This command will:
|
||||
|
||||
- [Set up Storybook for your project](/packages/storybook) - including the `@storybook/addon-interactions` addon.
|
||||
- Add a `play` function to your stories.
|
||||
- Install the necessary dependencies.
|
||||
- Generate a `test-storybook` target in your project's `project.json`, which has a command to invoke the Storybook test runner.
|
||||
|
||||
## Writing an Interaction Test
|
||||
|
||||
The Nx generator will create a very simple interaction test for you. You can find it in the `.stories.ts` file for your component. This test will only be asserting if some text exists in your component.
|
||||
You can modify it to suit your needs.
|
||||
|
||||
Let's take an example of a simple React component for a button:
|
||||
|
||||
```typescript
|
||||
import React, { useState } from 'react';
|
||||
|
||||
export function Button() {
|
||||
const [count, setCount] = useState(0);
|
||||
|
||||
const handleClick = () => {
|
||||
setCount(count + 1);
|
||||
};
|
||||
|
||||
return (
|
||||
<button role="button" onClick={handleClick}>
|
||||
You've clicked me {count} times
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
export default Button;
|
||||
```
|
||||
|
||||
In your `.stories.ts` file for that component, you can use the play function to simulate interactions. For example:
|
||||
|
||||
```typescript
|
||||
export const ButtonClicked: Story = {
|
||||
play: async ({ canvasElement }) => {
|
||||
const canvas = within(canvasElement);
|
||||
const button = canvas.getByRole('button');
|
||||
await userEvent.click(button);
|
||||
expect(canvas.getByRole('button').innerText).toBe(
|
||||
"You've clicked me 1 times"
|
||||
);
|
||||
await userEvent.click(button);
|
||||
expect(canvas.getByRole('button').innerText).toBe(
|
||||
"You've clicked me 2 times"
|
||||
);
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
Here, the play function is simulating a click on the button using the `userEvent.click` method. It is then asserting that the button's text has changed to reflect the number of times it has been clicked.
|
||||
|
||||
You can read more about how to write interaction tests in the [Storybook documentation](https://storybook.js.org/docs/react/writing-tests/interaction-testing).
|
||||
|
||||
## Running Interaction Tests
|
||||
|
||||
To run the interaction tests, you can use the `test-storybook` target that was generated for your project:
|
||||
|
||||
```bash
|
||||
nx test-storybook project-name
|
||||
```
|
||||
|
||||
Make sure you have Storybook running in another tab, so that the test runner can connect to it:
|
||||
|
||||
```bash
|
||||
nx storybook project-name
|
||||
```
|
||||
|
||||
## Interaction Tests vs. Cypress E2E Tests
|
||||
|
||||
As the landscape of testing has evolves, we are also adjusting our approach to testing in Nx, and the Storybook generators. Nx has been consistently suggesting the use of Cypress for e2e tests in conjunction with Storybook. This approach, while effective, had its own challenges. A new, separate e2e project would be generated, and setup specifically to work with Storybook, leading to a bifurcated setup: your component stories in one place, and the e2e tests that validated them in another.
|
||||
|
||||
However, with the introduction of Storybook Interaction Tests, this approach can be simplified. This new feature allows developers to integrate tests directly within the stories they are already creating, making the development and testing process more straightforward. Why maintain two separate projects or setups when you can do everything in one place?
|
||||
|
||||
Choosing to promote Storybook Interaction Tests over the previous Cypress e2e setup was not a decision made lightly. Here's why we believe it's a beneficial shift:
|
||||
|
||||
- **Unified Workflow:** Interaction tests allow developers to keep their focus on one tool. Instead of juggling between Storybook and a separate e2e project, everything is integrated. This means quicker iterations and a simplified dev experience.
|
||||
|
||||
- **Leaner Project Structure:** Avoiding the need to generate a separate e2e project means fewer files, less configuration, and a more straightforward project structure. This can make onboarding new developers or navigating the codebase simpler.
|
||||
|
||||
- **Optimized Performance:** Interaction tests are lightweight and quick to execute compared to traditional e2e tests. They run directly in the context of the component story, ensuring that tests are precise and fast.
|
||||
|
||||
- **Consistency:** Keeping the stories and their associated tests together ensures a tighter bond between what's developed and what's tested. It reduces the chances of tests becoming outdated or misaligned with the component's actual behavior.
|
||||
|
||||
Because of these benefits, it made sense for our Storybook configuration generator to switch from the Cypress e2e + Storybook combination to the integrated approach of Storybook Interaction Tests. By integrating e2e-like tests into the existing Storybook setup, we offer developers a smoother, more efficient, and simpler setup and testing experience.
|
||||
@@ -18,11 +18,7 @@
|
||||
"default": 9009
|
||||
},
|
||||
"previewUrl": { "type": "string", "description": "Preview URL." },
|
||||
"host": {
|
||||
"type": "string",
|
||||
"description": "Host to listen on.",
|
||||
"default": "localhost"
|
||||
},
|
||||
"host": { "type": "string", "description": "Host to listen on." },
|
||||
"staticDir": {
|
||||
"type": "array",
|
||||
"description": "Directory where to load static files from, array of strings.",
|
||||
|
||||
@@ -18,15 +18,22 @@
|
||||
"x-dropdown": "projects",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"interactionTests": {
|
||||
"type": "boolean",
|
||||
"description": "Set up Storybook interaction tests.",
|
||||
"x-prompt": "Do you want to set up Storybook interaction tests?",
|
||||
"alias": ["configureTestRunner"],
|
||||
"default": true
|
||||
},
|
||||
"configureCypress": {
|
||||
"type": "boolean",
|
||||
"description": "Run the cypress-configure generator.",
|
||||
"x-prompt": "Configure a cypress e2e app to run against the storybook instance?",
|
||||
"x-priority": "important"
|
||||
"x-deprecated": "Use interactionTests instead. This option will be removed in v18."
|
||||
},
|
||||
"cypressDirectory": {
|
||||
"type": "string",
|
||||
"description": "A directory where the Cypress project will be placed. Added at root by default."
|
||||
"description": "A directory where the Cypress project will be placed. Added at root by default.",
|
||||
"x-deprecated": "Use interactionTests instead. This option will be removed in v18."
|
||||
},
|
||||
"linter": {
|
||||
"description": "The tool to use for running lint checks.",
|
||||
@@ -56,10 +63,6 @@
|
||||
"description": "Add a static-storybook to serve the static storybook built files.",
|
||||
"default": false
|
||||
},
|
||||
"configureTestRunner": {
|
||||
"type": "boolean",
|
||||
"description": "Add a Storybook Test-Runner target."
|
||||
},
|
||||
"bundler": {
|
||||
"description": "The Storybook builder to use.",
|
||||
"type": "string",
|
||||
@@ -101,7 +104,7 @@
|
||||
}
|
||||
},
|
||||
"required": ["name", "uiFramework"],
|
||||
"examplesFile": "---\ntitle: Storybook configuration generator examples\ndescription: This page contains examples for the @nx/storybook:configuration generator.\n---\n\nThis is a framework-agnostic generator for setting up Storybook configuration for a project.\n\n```bash\nnx g @nx/storybook:configuration\n```\n\nStarting Nx 16, Nx does not support Storybook v6 any more. So, Nx will configure your project to use Storybook v7. If you are not on Storybook 7 yet, please migrate. You can read more about how to migrate to Storybook 7 in our [Storybook 7 migration generator](/packages/storybook/generators/migrate-7) guide.\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- The `uiFramework` you want to use. Supported values are:\n - `@storybook/angular`\n - `@storybook/html-webpack5`\n - `@storybook/nextjs`\n - `@storybook/preact-webpack5`\n - `@storybook/react-webpack5`\n - `@storybook/react-vite`\n - `@storybook/server-webpack5`\n - `@storybook/svelte-webpack5`\n - `@storybook/svelte-vite`\n - `@storybook/sveltekit`\n - `@storybook/vue-webpack5`\n - `@storybook/vue-vite`\n - `@storybook/vue3-webpack5`\n - `@storybook/vue3-vite`\n - `@storybook/web-components-webpack5`\n - `@storybook/web-components-vite`\n- Whether you want to `configureCypress`. If you choose `yes`, a Cypress e2e app will be created (or configured) to run against the project's Storybook instance.\n- Whether you want to `configureTestRunner`. If you choose `yes`, a `test-storybook` target will be generated in your project's `project.json`, with a command to invoke the [Storybook `test-runner`](https://storybook.js.org/docs/react/writing-tests/test-runner).\n\nYou must provide a `name` and a `uiFramework` for the generator to work.\n\nYou can read more about how this generator works, in the [Storybook package overview page](/packages/storybook#generating-storybook-configuration).\n\nIf you are using Angular, React, React Native or Next.js in your project, it's best to use the framework specific generator:\n\n- [React Storybook Configuration Generator](/packages/react/generators/storybook-configuration) (React and Next.js projects)\n\n- [Angular Storybook Configuration Generator](/packages/angular/generators/storybook-configuration)\n\n- [React Native Storybook Configuration Generator](/packages/react-native/generators/storybook-configuration)\n\n## Examples\n\n### Generate Storybook configuration using TypeScript\n\n```bash\nnx g @nx/storybook:configuration ui --uiFramework=@storybook/web-components-vite --tsConfiguration=true\n```\n\nThis will generate a Storybook configuration for the `ui` project using TypeScript for the Storybook configuration files (the files inside the `.storybook` directory).\n",
|
||||
"examplesFile": "---\ntitle: Storybook configuration generator examples\ndescription: This page contains examples for the @nx/storybook:configuration generator.\n---\n\nThis is a framework-agnostic generator for setting up Storybook configuration for a project.\n\n```bash\nnx g @nx/storybook:configuration\n```\n\nStarting Nx 16, Nx does not support Storybook v6 any more. So, Nx will configure your project to use Storybook v7. If you are not on Storybook 7 yet, please migrate. You can read more about how to migrate to Storybook 7 in our [Storybook 7 migration generator](/packages/storybook/generators/migrate-7) guide.\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- The `uiFramework` you want to use. Supported values are:\n - `@storybook/angular`\n - `@storybook/html-webpack5`\n - `@storybook/nextjs`\n - `@storybook/preact-webpack5`\n - `@storybook/react-webpack5`\n - `@storybook/react-vite`\n - `@storybook/server-webpack5`\n - `@storybook/svelte-webpack5`\n - `@storybook/svelte-vite`\n - `@storybook/sveltekit`\n - `@storybook/vue-webpack5`\n - `@storybook/vue-vite`\n - `@storybook/vue3-webpack5`\n - `@storybook/vue3-vite`\n - `@storybook/web-components-webpack5`\n - `@storybook/web-components-vite`\n- Whether you want to set up [Storybook interaction tests](https://storybook.js.org/docs/angular/writing-tests/interaction-testing) (`interactionTests`). If you choose `yes`, all the necessary dependencies will be installed. Also, a `test-storybook` target will be generated in your project's `project.json`, with a command to invoke the [Storybook `test-runner`](https://storybook.js.org/docs/angular/writing-tests/test-runner). You can read more about this in the [Nx Storybook interaction tests documentation page](/packages/storybook/documents/interaction-tests).\n\nYou must provide a `name` and a `uiFramework` for the generator to work.\n\nYou can read more about how this generator works, in the [Storybook package overview page](/packages/storybook#generating-storybook-configuration).\n\nIf you are using Angular, React, React Native or Next.js in your project, it's best to use the framework specific generator:\n\n- [React Storybook Configuration Generator](/packages/react/generators/storybook-configuration) (React and Next.js projects)\n\n- [Angular Storybook Configuration Generator](/packages/angular/generators/storybook-configuration)\n\n- [React Native Storybook Configuration Generator](/packages/react-native/generators/storybook-configuration)\n\n## Examples\n\n### Generate Storybook configuration using JavaScript\n\n```bash\nnx g @nx/storybook:configuration ui --uiFramework=@storybook/web-components-vite --tsConfiguration=false\n```\n\nBy default, our generator generates TypeScript Storybook configuration files. You can choose to use JavaScript for the Storybook configuration files of your project (the files inside the `.storybook` directory, eg. `.storybook/main.js`).\n",
|
||||
"presets": []
|
||||
},
|
||||
"description": "Add Storybook configuration to a UI library or an application.",
|
||||
|
||||
@@ -37,7 +37,10 @@
|
||||
"description": "Specify which IP addresses the server should listen on.",
|
||||
"oneOf": [{ "type": "boolean" }, { "type": "string" }]
|
||||
},
|
||||
"https": { "type": "boolean", "description": "Serve using HTTPS." },
|
||||
"https": {
|
||||
"oneOf": [{ "type": "boolean" }, { "type": "object" }],
|
||||
"description": "Serve using HTTPS. https://vitejs.dev/config/server-options.html#server-https"
|
||||
},
|
||||
"hmr": {
|
||||
"description": "Enable hot module replacement. For more options, use the 'hmr' option in the Vite configuration file.",
|
||||
"type": "boolean"
|
||||
|
||||
@@ -27,7 +27,10 @@
|
||||
"description": "Specify which IP addresses the server should listen on.",
|
||||
"oneOf": [{ "type": "boolean" }, { "type": "string" }]
|
||||
},
|
||||
"https": { "type": "boolean", "description": "Serve using HTTPS." },
|
||||
"https": {
|
||||
"oneOf": [{ "type": "boolean" }, { "type": "object" }],
|
||||
"description": "Serve using HTTPS. https://vitejs.dev/config/server-options.html#server-https"
|
||||
},
|
||||
"open": {
|
||||
"description": "Automatically open the app in the browser on server start. When the value is a string, it will be used as the URL's pathname.",
|
||||
"oneOf": [{ "type": "boolean" }, { "type": "string" }]
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
},
|
||||
"coverageProvider": {
|
||||
"type": "string",
|
||||
"enum": ["c8", "istanbul"],
|
||||
"default": "c8",
|
||||
"enum": ["v8", "c8", "istanbul"],
|
||||
"default": "v8",
|
||||
"description": "Coverage provider to use."
|
||||
},
|
||||
"testTarget": {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user