Compare commits
155 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7eecf06a44 | |||
| 91c6c6fcf9 | |||
| ee4de0b3ac | |||
| 1d7465b02e | |||
| 67d0e33874 | |||
| f922e2bcf0 | |||
| bf15e68de9 | |||
| e20f6079c5 | |||
| c3709b2b84 | |||
| 99a0e7c5a0 | |||
| 13ec93c783 | |||
| 4cd640a918 | |||
| 657814cd41 | |||
| 313f6a9ebc | |||
| 5d8a4e37cc | |||
| 012d4e95a1 | |||
| 48cd50a550 | |||
| 5bdda1daac | |||
| e0e6a23bd7 | |||
| 0d6667d156 | |||
| 99700c075c | |||
| a8de7df0e0 | |||
| b6d41b617e | |||
| fca739e5b5 | |||
| a0f4260ebd | |||
| cfcd4d1440 | |||
| 36eaafdcfd | |||
| 22cec78331 | |||
| 8bafc3b113 | |||
| 6fbd130322 | |||
| fbd622b8a5 | |||
| 0f9c93ceb8 | |||
| f96fda95f4 | |||
| 0d1c96085e | |||
| f0172c2e55 | |||
| b4aadccac8 | |||
| c2eae0e297 | |||
| 726c07d324 | |||
| c21d9928e1 | |||
| 6434ab3da3 | |||
| c9ef2f5d8a | |||
| 77dc090a75 | |||
| 5068a26ed6 | |||
| e4939fa3ee | |||
| a2670639db | |||
| f415595508 | |||
| be2eab926b | |||
| 098d8a64a1 | |||
| cfb67cf124 | |||
| ee91b63b42 | |||
| 7fca6e236a | |||
| df77fde81f | |||
| 7e388243e0 | |||
| d2564c6292 | |||
| 0af50a9f9d | |||
| 6684fc0688 | |||
| e82e69198f | |||
| e3f8c813d6 | |||
| 2d135f952b | |||
| aaa9cced76 | |||
| ecba861be3 | |||
| 2c07bf0f73 | |||
| 5114f97912 | |||
| 89ab8874b0 | |||
| 04151ca5dc | |||
| fdc09fbf68 | |||
| 192bfe72d9 | |||
| 28c53f942b | |||
| 3474d7c607 | |||
| 5d61191999 | |||
| de8b18980c | |||
| d8d74da9fb | |||
| d23350fbc0 | |||
| c3b4bf6c43 | |||
| 9769c2986c | |||
| 288193b761 | |||
| 902eef5320 | |||
| 51cf34fc81 | |||
| e3df75b1e5 | |||
| 50d83e2178 | |||
| cc1441170a | |||
| 2e98918a3f | |||
| 59a3db8685 | |||
| 37adb48db8 | |||
| 7328a8dae4 | |||
| e9a07da4ac | |||
| 7c25cf150d | |||
| f89fca98f3 | |||
| 625d8f3095 | |||
| b848bb3dba | |||
| 2fa3ce21d4 | |||
| 15060e3a4f | |||
| 4773e35d01 | |||
| 7157e7a07c | |||
| 6c5916a79f | |||
| 972c01bd25 | |||
| 59e3704fb3 | |||
| aefafc55ba | |||
| 67d03937b5 | |||
| db5e2f63bf | |||
| bba941ab4d | |||
| 1dbddb11ba | |||
| 75b2080521 | |||
| dd14f3943c | |||
| 3cc321d4ce | |||
| c1469b68ca | |||
| 38e29b9e90 | |||
| 54dbbfded5 | |||
| 9bd08851f0 | |||
| 6bd86158d1 | |||
| 9ad6b8c208 | |||
| d32ca3788e | |||
| 201cd89f5a | |||
| c62d78dd7e | |||
| e9be7d92cf | |||
| 5448046f06 | |||
| da901dec08 | |||
| 922c0469b1 | |||
| a54bbcc8ac | |||
| 6b870050b6 | |||
| 8c25c02112 | |||
| 6a46030995 | |||
| 3ec539065d | |||
| 06d549b043 | |||
| ec5a5e6360 | |||
| 2cb58b937d | |||
| 08a33075a7 | |||
| dc67660fec | |||
| c66b99c499 | |||
| 182b46ca66 | |||
| 8eb6159696 | |||
| 25c5643283 | |||
| 0bf7565664 | |||
| b018b94096 | |||
| 1ea7bb43e1 | |||
| 47663727c1 | |||
| 0d0d6c7c11 | |||
| 4030494cd5 | |||
| 6089b28916 | |||
| 9ab1068d1d | |||
| a435e263cd | |||
| bcaef27046 | |||
| c75aa8f661 | |||
| 55143297be | |||
| a5c5cbf326 | |||
| 30d722bd98 | |||
| beded4ef6d | |||
| 8b3f9d883a | |||
| cbc19c54ae | |||
| 9921496d64 | |||
| 6904789b10 | |||
| 5f92f1729b | |||
| fc7ee36a96 | |||
| 128778e7d1 | |||
| c7894d7579 |
@@ -82,7 +82,7 @@ jobs:
|
||||
NX_E2E_CI_CACHE_KEY: e2e-circleci-linux
|
||||
NX_DAEMON: 'true'
|
||||
NX_PERF_LOGGING: 'false'
|
||||
NX_VERBOSE_LOGGING: 'false'
|
||||
NX_VERBOSE_LOGGING: 'true'
|
||||
NX_NATIVE_LOGGING: 'false'
|
||||
NX_E2E_RUN_E2E: 'true'
|
||||
NX_CI_EXECUTION_ENV: 'linux'
|
||||
@@ -114,6 +114,12 @@ jobs:
|
||||
pnpm nx-cloud record -- nx format:check --base=$NX_BASE --head=$NX_HEAD &
|
||||
pids+=($!)
|
||||
|
||||
pnpm nx-cloud record -- nx sync:check
|
||||
pids+=($!)
|
||||
|
||||
pnpm nx-cloud record -- nx-cloud conformance:check
|
||||
pids+=($!)
|
||||
|
||||
pnpm nx run-many -t check-imports check-commit check-lock-files check-codeowners documentation --parallel=1 --no-dte &
|
||||
pids+=($!)
|
||||
|
||||
|
||||
@@ -71,9 +71,17 @@
|
||||
"rules": {
|
||||
"@nx/workspace/ensure-pnpm-lock-version": [
|
||||
"error",
|
||||
{ "version": "9.0" }
|
||||
{
|
||||
"version": "9.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"rules": {
|
||||
"@angular-eslint/prefer-standalone": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -22,10 +22,10 @@ jobs:
|
||||
node-version: 18
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
uses: pnpm/action-setup@v4
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 8
|
||||
version: 9.8.0
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
|
||||
@@ -18,9 +18,9 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 8
|
||||
version: 9.8.0
|
||||
|
||||
- name: Use Node.js ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v3
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cached-issue-data
|
||||
path: ./scripts/issues-scraper/cached/data.json
|
||||
|
||||
@@ -419,7 +419,7 @@ jobs:
|
||||
- name: (Stable Release Only) Trigger Docs Release
|
||||
# Publish docs only on a full release
|
||||
if: ${{ !github.event.release.prerelease && github.event_name == 'release' }}
|
||||
run: npx ts-node ./scripts/release-docs.ts
|
||||
run: npx ts-node -P ./scripts/tsconfig.scripts.json ./scripts/release-docs.ts
|
||||
|
||||
- name: (PR Release Only) Create comment for successful PR release
|
||||
if: success() && github.event.inputs.pr
|
||||
|
||||
@@ -40,14 +40,13 @@ out
|
||||
# Local dev files
|
||||
.env.local
|
||||
.bashrc
|
||||
.nx
|
||||
|
||||
*.node
|
||||
|
||||
# Fix for issue when working on the repo in a dev container
|
||||
.pnpm-store
|
||||
.nx/cache
|
||||
.nx/workspace-data
|
||||
.nx
|
||||
!.nx/workflows
|
||||
|
||||
.cargo/.package-cache
|
||||
.cargo/bin/
|
||||
@@ -61,4 +60,4 @@ target
|
||||
*.wasm
|
||||
/wasi-sdk*
|
||||
|
||||
vite.config.*.timestamp*
|
||||
vite.config.*.timestamp*
|
||||
|
||||
@@ -56,8 +56,8 @@ launch-templates:
|
||||
|
||||
- name: Install zip and unzip
|
||||
script: sudo apt-get -yqq install zip unzip
|
||||
linux-large:
|
||||
resource-class: 'docker_linux_amd64/large'
|
||||
linux-extra-large:
|
||||
resource-class: 'docker_linux_amd64/extra_large'
|
||||
image: 'ubuntu22.04-node20.11-v10'
|
||||
env:
|
||||
GIT_AUTHOR_EMAIL: test@test.com
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
distribute-on:
|
||||
default: auto linux-medium, 1 linux-large
|
||||
default: auto linux-medium, 1 linux-extra-large
|
||||
assignment-rules:
|
||||
- project: nx-dev
|
||||
target: build-base
|
||||
runs-on:
|
||||
- linux-large
|
||||
- linux-extra-large
|
||||
- target: test
|
||||
runs-on:
|
||||
- linux-medium
|
||||
|
||||
@@ -96,8 +96,8 @@ rust-toolchain @nrwl/nx-native-reviewers
|
||||
/packages/webpack/** @nrwl/nx-js-reviewers
|
||||
/e2e/webpack/** @nrwl/nx-js-reviewers
|
||||
/packages/rspack/** @nrwl/nx-js-reviewers
|
||||
/packages/rspack/src/utils/module-federation @nrwl/nx-js-reviewers
|
||||
/e2e/rspack/** @nrwl/nx-js-reviewers
|
||||
/packages/rsbuild/** @nrwl/nx-js-reviewers
|
||||
/packages/esbuild/** @nrwl/nx-js-reviewers
|
||||
/e2e/esbuild/** @nrwl/nx-js-reviewers
|
||||
/packages/rollup/** @nrwl/nx-js-reviewers
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title: Improve your architecture and CI pipeline times with Nx projects
|
||||
slug: improve-architecture-and-ci-times-with-projects
|
||||
authors: [Philip Fulcher]
|
||||
tags: [nx, enterprise]
|
||||
tags: [nx, 'customer story']
|
||||
cover_image: '/blog/images/2024-10-25/header.avif'
|
||||
pinned: true
|
||||
---
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
---
|
||||
title: Advent of Code Gets The Crystal Treatment!
|
||||
slug: advent-of-code-crystal-edition
|
||||
authors: ['Zack DeRose']
|
||||
tags: [nx]
|
||||
cover_image: /blog/images/2024-11-30/thumbnail.png
|
||||
youtubeUrl: https://youtu.be/st6Yq-19bW8
|
||||
---
|
||||
|
||||
Talking with developers, we've found that one of the main reasons folks like using Nx is: Nx allows their team to focus on shipping a great product, while Nx handles all the rest:
|
||||
|
||||
- setting up tools for testing, linting, and etc.
|
||||
- dynamic CI/CD pipelines with Nx Cloud
|
||||
- a code generation framework to manage expanding their projects
|
||||
|
||||
For the past couple years, we've been releasing an `Advent of Code Starter Repo` with this in mind!
|
||||
|
||||
If you're not familiar, [Advent of Code](https://adventofcode.com/) is a special event that runs every December that works like a Advent Calendar of programming problems. Every day at midnight, we all get access to 2 new puzzles that will award us a gold star if you can complete it successfully.
|
||||
|
||||
Specifically, our goal is to give developers an easy to use starting point that allows them to focus on solving the puzzles, and handing the rest over to Nx instead of wrestling with setting up tools, file i/o, and the like.
|
||||
|
||||
This year, we were able to further reduce the nx-specific config needed, using the new [Nx Project Crystal](/concepts/inferred-tasks) enhancements that landed earlier this year!
|
||||
|
||||
## Packages Landed!
|
||||
|
||||
We're excited to announce version `2.0.0` of the [`create-ts-aoc-starter`](https://www.npmjs.com/package/create-ts-aoc-starter) and [`ts-aoc-starter`](https://www.npmjs.com/package/ts-aoc-starter) packages are released, just in time for Advent of Code 2024!
|
||||
|
||||
### [`create-ts-aoc-starter`](https://www.npmjs.com/package/create-ts-aoc-starter)
|
||||
|
||||
This is the code generation command to setup your Advent of Code workspace! Simply run the command:
|
||||
|
||||
```terminal
|
||||
> npx create-ts-aoc-starter@latest
|
||||
```
|
||||
|
||||
And we'll spin up your workspace for you, all tools configured and ready to go!
|
||||
|
||||
### [`ts-aoc-starter`](https://www.npmjs.com/package/ts-aoc-starter)
|
||||
|
||||
This is the Nx Plugin we're shipping this year that comes pre-installed whenever you run the `create-ts-aoc-starter` command. By installing this package, and adding the `dynamic-tasks` to your `plugins` array of your `nx.json` file, Nx can setup all the commands we'll need for Advent of Code this year, with no manual setup or config required!
|
||||
|
||||
## How It Works
|
||||
|
||||
After generating your workspace, you'll find a directory for each of the 25 days of the game, and inside each directory, you'll find the following files:
|
||||
|
||||
- `a.data.sample.txt`
|
||||
- `a.data.txt`
|
||||
- `a.ts`
|
||||
- `b.data.sample.txt`
|
||||
- `b.data.txt`
|
||||
- `b.ts`
|
||||
|
||||
Provide your solution to the first part of the day in the `a.ts`, and you can copy and paste your code into `a.data.txt`.
|
||||
|
||||
For _most_ days, the puzzle also comes with a sample set of data to demonstrate what the correct answer would be. On these days, you can enter that data into the `a.data.sample.txt` file provided!
|
||||
|
||||
To run your solution against the sample data for day 1 then, run one of the commands:
|
||||
|
||||
```terminal
|
||||
> nx day-1-a-sample
|
||||
> nx day-1-sample
|
||||
> nx 1-a-sample
|
||||
> nx 1-sample
|
||||
```
|
||||
|
||||
And to run against the actual data, you can run one of the following:
|
||||
|
||||
```terminal
|
||||
> nx day-1-a
|
||||
> nx day-1
|
||||
> nx 1-a
|
||||
> nx 1
|
||||
```
|
||||
|
||||
Sometimes the second part of the problem simply builds on top of the first. On those days, you can just continue to code in the `a.ts` file, but a `b.ts` and `data.txt` files are also provided if you want to start over. To run these, use the commands:
|
||||
|
||||
```terminal
|
||||
> nx day-1-b
|
||||
> nx 1-b
|
||||
> nx day-1-b-sample
|
||||
> nx 1-b-sample
|
||||
```
|
||||
|
||||
### New Feature for 2.0.0: File Watching!
|
||||
|
||||
We've also added file watching (using [`nx watch`](/nx-api/nx/documents/watch) behind the scenes!)
|
||||
|
||||
Simply add `watch-` to the start of any of the commands and aliases listed above to start any of them in watch mode, so they automatically re-run as soon as any changes to the file system are detected! Example:
|
||||
|
||||
```terminal
|
||||
> nx watch-1
|
||||
```
|
||||
|
||||
### New Feature for 2.0.0: Additional Data Sets!
|
||||
|
||||
This year, we're also including the ability to drop in additional data sets. This can be particularly helpful in later days (as the problems get harder) and you want to test your solution on a data set that isn't the specific sample or the actual dataset provided. For this, simply create a `data.txt` file matching the naming pattern.
|
||||
|
||||
For example, if I wanted to create a data set called `foo`, I'd create in the filesystem a file called `a.data.foo.txt`. Then to run against this data set, run one of the commands:
|
||||
|
||||
```terminal
|
||||
> nx day-1-a-foo
|
||||
> nx day-1-foo
|
||||
> nx 1-a-foo
|
||||
> nx 1-foo
|
||||
> nx watch-day-1-a-foo
|
||||
> nx watch-day-1-foo
|
||||
> nx watch-1-a-foo
|
||||
> nx watch-1-foo
|
||||
```
|
||||
|
||||
## Learn more
|
||||
|
||||
- [Tutorial: Creating Your Own Plugin With Inferred Tasks](/extending-nx/tutorials/tooling-plugin#create-an-inferred-task)
|
||||
- [Nx Docs](/getting-started/intro)
|
||||
- [X/Twitter](https://twitter.com/nxdevtools)
|
||||
- [LinkedIn](https://www.linkedin.com/company/nrwl/)
|
||||
- [Nx GitHub](https://github.com/nrwl/nx)
|
||||
- [Nx Official Discord Server](https://go.nx.dev/community)
|
||||
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
|
||||
- [Speed up your CI](/nx-cloud)
|
||||
@@ -0,0 +1,86 @@
|
||||
---
|
||||
title: Define the relationship with monorepos
|
||||
slug: define-the-relationship-with-monorepos
|
||||
authors: ['Philip Fulcher']
|
||||
tags: [nx]
|
||||
cover_image: /blog/images/2024-12-03/header.avif
|
||||
---
|
||||
|
||||
A monorepo might sound like a big, intimidating thing, but we're going to break it down to just the bare essentials. **A monorepo helps you better manage the relationships that already exist between your projects.** Once we understand those relationships, we can use tools to very quickly define them and pull them together into a more cohesive whole.
|
||||
|
||||
## So, what is a monorepo?
|
||||
|
||||
Let's start with the big question: what even is a monorepo?
|
||||
|
||||
> That's like when Google only has one repo for the entire company, right?
|
||||
|
||||
Not quite. That scale of monorepo doesn't work for most organizations, and we can still use a monorepo approach for smaller systems.
|
||||
|
||||
> So it's when you throw all your code in one repo and figure out how to manage it later?
|
||||
|
||||
This is also a pretty bad idea. We need tools and processes to manage this volume of code in a single repo.
|
||||
|
||||
The best definition I've seen comes from [monorepo.tools](https://monorepo.tools):
|
||||
|
||||
> A monorepo is a single repository containing multiple distinct projects with well-defined relationships.
|
||||
|
||||
Let's dig into that last part. What do we mean by **well-defined relationships?** It's useful to stat thinking about relationships between code in terms of distance.
|
||||
|
||||
## The shortest distance: importing from another file
|
||||
|
||||
We'll start with the smallest possible distance between two pieces of code: importing something from another file.
|
||||
|
||||

|
||||
|
||||
Say you have a button component. You create a form and import that button to use. This is a relationship we take for granted because we do it all the time, but there are some distinct benefits to this.
|
||||
|
||||
First, we see the impact of our change immediately. We make a change in the button, and we either see the result rendered in the browser, or we get a failed compilation. Or we have a test suite running that will fail or pass a test. Or lint rule warnings appear in our IDE. We immediately see the result of the change we've made, and the impact on the relationship.
|
||||
|
||||
This makes iteration fast: we see the impact of the change and can either refine that change or move on to the next one.
|
||||
|
||||
## One step away in distance: importing from a package
|
||||
|
||||
Let's take a step further away and think about the relationship when you have imported something from a package.
|
||||
|
||||

|
||||
|
||||
Say you have a design system published for your organization. You import the button from that package to use in your form. This looks very similar to what we did before, but we've introduced a big change in this relationship: seeing change is no longer immediate.
|
||||
|
||||
If we make a change in the button, there will be some sort of compilation, bundling, and publishing that will need to happen. And we'll need to consume the latest version of the package to actually see the change.
|
||||
|
||||
This is a slow process when you're working alone, but it can be managed with some tools. However, what happens if this change crosses team boundaries? Your design system team makes a change to the button and has to go through a PR review and merge process. Eventually that change is released as a new version and published. At some point later, you upgrade your version of the dependency just to find out the button has changed. But there's a bug! You report back to the design system team, and now they're going through this entire process again to get the fix in and published. This iteration cycle is very slow because understanding the impact of the change in the design system is no longer immediately apparent to consumers.
|
||||
|
||||
## Even further away: APIs
|
||||
|
||||
Let's step one step further: using APIs. Your frontend (in most cases) requires a backend, and it will be broken without it.
|
||||
|
||||

|
||||
|
||||
There is an **implicit dependency** between the frontend and backend. You don't import code directly, but you do depend on the backend to function.
|
||||
|
||||
Let's say that there's a new API endpoint needed, and you agreed with the team that it would be called `api/v1/contact/create` and would accept a payload with `contactName`.
|
||||
|
||||
But, the backend team had a conversation about naming standards during their sprint and made the decision that it could really be `contact/init` with a payload of `fullName`.
|
||||
|
||||
Understanding the impact of this change is now far-removed from making the change. Not only is there the PR merge, packaging, and releasing, but also deployment. It may not be until the end of the sprint before the impact of this change is actually understood. This iteration is practically glacial.
|
||||
|
||||
## How do monorepos help?
|
||||
|
||||
How do monorepos help with these relationships? **They shorten the distance of relationships between code.** Code is **colocated** so that the impact of your change can be understood immediately.
|
||||
|
||||
In the example with the design system, the button will be imported directly instead of going through a build and package process. The design system team can immediately see the impact of the change they're making and either adjust their approach or fix the issue directly in the consuming app.
|
||||
|
||||
For the API team, we can define that implicit relationship between backend and frontend so that we trigger e2e tests to confirm a change works. Or we can generate models from the backend to be consumed by the frontend. When the models are changed, the frontend code that imported those models will immediately reveal the impact of the change.
|
||||
|
||||
You might think that moving projects into a single repository changes the relationship between the projects. But the relationships we've talked about here already exist; the monorepo makes those relationships explicit and well-defined. With good monorepo tooling, we can understand the impact of change along any of these relationships faster in a monorepo.
|
||||
|
||||
## Learn more
|
||||
|
||||
- [Nx Docs](/getting-started/intro)
|
||||
- [X/Twitter](https://twitter.com/nxdevtools)
|
||||
- [LinkedIn](https://www.linkedin.com/company/nrwl/)
|
||||
- [Bluesky](https://bsky.app/profile/nx.dev)
|
||||
- [Nx GitHub](https://github.com/nrwl/nx)
|
||||
- [Nx Official Discord Server](https://go.nx.dev/community)
|
||||
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
|
||||
- [Speed up your CI](/nx-cloud)
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
title: Nx Cloud Pipelines Come To Nx Console
|
||||
slug: nx-cloud-pipelines-come-to-nx-console
|
||||
authors: [Zack DeRose]
|
||||
tags: [nx, nx-cloud, nx-console, enterprise]
|
||||
cover_image: '/blog/images/2024-11-25/thumbnail.png'
|
||||
---
|
||||
|
||||
## Your CI Pipelines, Now At-A-Glance In Your IDE
|
||||
|
||||
We're in the process of adding a new integration between [Nx Cloud](/nx-cloud), our CI product, and [Nx Console](/getting-started/editor-setup) our official plugin for the VSCode and JetBrains IDEs!
|
||||
|
||||
Now, once you've [connected your Nx Console to Nx Cloud](https://blog.nrwl.io/nx-console-meets-nx-cloud-d45dc099dc5d), you will have access to a new panel in the console that shows all of your recent CI Pipelines, including those in progress now.
|
||||
|
||||

|
||||
|
||||
This way, you can keep an eye on the status of the pipeline of your latest PR, and always just 1 click away from seeing detailed your results on Nx Cloud.
|
||||
|
||||
## Notifications On What You Care About Most
|
||||
|
||||
In addition to a panel where you can see all of your recent pipelines, you can also receive pop-up notifications when a pipeline completes
|
||||
|
||||

|
||||
|
||||
Head to the Nx Console settings to adjust controls on these notifications. This will allow you to adjust notifications to only show for failed runs if you prefer, or to turn off the notifications altogether.
|
||||
|
||||

|
||||
|
||||
## Coming Soon!
|
||||
|
||||
We're in the process of landing this on Nx Console for VSCode now - and we're already dog-fooding it on the `nx` and `nx-console` repos. It will be landing in the next few week for all Nx Cloud projects, with the feature landing on Nx Console for JetBrains IDEs to follow soon!
|
||||
|
||||
For more on Nx Cloud, check out the Solutions tab above! Nx Cloud is free to get started, so you can [create your free account today](https://cloud.nx.app)!
|
||||
|
||||
[](/nx-cloud)
|
||||
|
||||
And if you're not using Nx Console yet, you can get started now with Nx Console available for VSCode and JetBrains IDEs:
|
||||
|
||||
{% install-nx-console /%}
|
||||
|
||||

|
||||
@@ -0,0 +1,196 @@
|
||||
---
|
||||
title: Tailoring Nx for Your Organization
|
||||
slug: tailoring-nx-for-your-organization
|
||||
authors: ['Philip Fulcher']
|
||||
tags: [nx]
|
||||
cover_image: /blog/images/2024-12-10/header.avif
|
||||
---
|
||||
|
||||
Maintaining a scalable and maintainable monorepo is one of the biggest challenges for growing teams. Standards are essential for keeping code consistent, but relying on documentation and human diligence often falls short. The real challenge is _how_ to enforce those standards effectively and sustainably.
|
||||
|
||||
This is where Nx comes in. Nx provides ["drop-in" plugins](/plugin-registry) that enhance the developer experience in monorepos, offering solutions for everything from code generation to automating caching and task execution. One of the biggest benefits is how easily you can **create [custom plugins](/extending-nx/intro/getting-started)** which allow you to **automate your standards based on your organization's needs**.
|
||||
|
||||
In this article, we’ll explore how Nx plugins, including custom ones, can help you maintain scalable monorepos while simplifying workflows for your team.
|
||||
|
||||
## What are Nx Plugins and why do you need them?
|
||||
|
||||
Nx plugins reduce the overhead of using specific tools or frameworks in a monorepo by automating common workflows. They are essentially NPM packages with a structure and metadata that Nx can interpret. A plugin may include:
|
||||
|
||||
- **Generators**: For scaffolding code.
|
||||
- **Executors**: For automating tasks like building, testing, or deploying.
|
||||
- **Migrations**: For updating codebases, similar to codemods.
|
||||
|
||||
You’re not required to use Nx plugins, but they can significantly simplify your workflows. For example, they automate repetitive tasks and enforce consistency across your projects. You can explore the [Nx Plugin Registry](/plugin-registry) to see the available plugins, including those built by the Nx core team and contributions from the community.
|
||||
|
||||
Installing a plugin is straightforward. Use the `nx add` command to integrate a plugin into your workspace. For example:
|
||||
|
||||
```shell
|
||||
nx add @nx/playwright
|
||||
```
|
||||
|
||||
The plugins provided by the Nx team are usually designed to cover general use cases, like setting up popular frameworks or tools. However, the real power of lies in **creating your own plugins—or extending existing ones—to** automate your organization’s specific workflows.
|
||||
|
||||
Creating a custom plugin might sound intimidating, but it’s simpler than you think. The `@nx/devkit` package provides utilities to help you build functionality just like the Nx core team. You’re not starting from scratch; you’re leveraging an established API designed to make the process accessible and efficient.
|
||||
|
||||
## Getting started with custom plugins
|
||||
|
||||
First, install the `@nx/plugin` package which provides useful code scaffolding features for creating a new custom plugin.
|
||||
|
||||
```shell
|
||||
nx add @nx/plugin
|
||||
```
|
||||
|
||||
Once installed, run the following generator that ships with the `@nx/plugin` package:
|
||||
|
||||
```shell
|
||||
nx g plugin packages/nx-plugin --importPath=@org/nx-plugin
|
||||
```
|
||||
|
||||
Also, make sure to check out our [extensive instructions in our docs for building plugins](/extending-nx/intro/getting-started), or you can jump right to the API for [@nx/plugin](/nx-api/plugin).
|
||||
|
||||
## Setting up custom generators
|
||||
|
||||
Creating custom generators is the biggest bang-for-your-buck change you can make using custom plugins. The generators distributed with Nx plugins have a wide set of options that allow you to fine-tune their output to meet your needs. But if you have decided on certain rules for your organization, such as a directory structure or project tag schema, it can be easy to forget some of your options when running a generator.
|
||||
|
||||
Custom generators are an easy way to enforce how generators from Nx plugins are used. For example:
|
||||
|
||||
```shell
|
||||
nx generate @nx/react:library --name shared-util --directory libs/shared/util --importPath="@org/shared/util" --tags=type:util,scope:shared
|
||||
```
|
||||
|
||||
To understand the right options for this generator, the engineer needs to remember:
|
||||
|
||||
- the project naming convention based on the type of library and its scope
|
||||
- the directory structure based on nested folders for scope
|
||||
- the import naming convention
|
||||
- tag name convention based on type and scope
|
||||
|
||||
This is a lot to remember! Even the most diligent engineer will forget one of these or miss a typo. **A custom generator** can solve this problem.
|
||||
Consider a custom generator for your organization that accepts options like this:
|
||||
|
||||
```shell
|
||||
nx generate @org/plugin:library --name util --scope shared --type util
|
||||
```
|
||||
|
||||
This command runs our hypothetical custom generator and provides it with a scope and type for the library. This custom generator takes well-defined options for your org and translates them into the options needed for the underlying generator. A snippet of that would look something like this:
|
||||
|
||||
```typescript
|
||||
import { Tree } from '@nx/devkit';
|
||||
import { Linter } from '@nx/eslint';
|
||||
import { libraryGenerator as reactLibraryGenerator } from '@nx/react';
|
||||
import { LibraryGeneratorSchema } from './schema';
|
||||
|
||||
export async function libraryGenerator(
|
||||
tree: Tree,
|
||||
options: LibraryGeneratorSchema // schema with strong types for scope and type
|
||||
) {
|
||||
// create project name based on submitted name and type
|
||||
const projectName = `${options.type}-${options.name}`;
|
||||
|
||||
// determine directory based on scope and project name
|
||||
const directory = joinPathFragments('libs', options.scope, projectName);
|
||||
|
||||
// determine import path based on scope and project name
|
||||
const importPath = `@org/${scope}/${projectName}`;
|
||||
|
||||
// run the @nx/react library generator with options set
|
||||
const callbackAfterFilesUpdated = await reactLibraryGenerator(tree, {
|
||||
name: projectName,
|
||||
directory,
|
||||
importPath,
|
||||
tags: [`type:${options.type}`, `scope:${shared}`],
|
||||
linter: Linter.EsLint,
|
||||
style: 'css',
|
||||
unitTestRunner: 'vitest',
|
||||
});
|
||||
|
||||
return callbackAfterFilesUpdated;
|
||||
}
|
||||
|
||||
export default libraryGenerator;
|
||||
```
|
||||
|
||||
This example of a generator doesn’t do much on its own, but it pre-populates options for the underlying generator. This can already be a huge gain in terms of ensuring consistency as it:
|
||||
|
||||
- Names the project appropriately
|
||||
- Creates the correct import path
|
||||
- Places new projects in the correct directory
|
||||
- Adds the proper tags to the project
|
||||
- Selects the correct set of tools
|
||||
|
||||
All of that without having to refer to your documentation on how to run the generator the right way. And most of the functionality is provided by Nx! You only need to provide some logic specific to your organization.
|
||||
|
||||
These generators will also show up in [Nx Console](/getting-started/editor-setup) alongside the other generators from Nx plugins, so engineers will have quick access.
|
||||
|
||||
{% youtube src="https://www.youtube.com/watch?v=myqfGDWC2go" /%}
|
||||
|
||||
## Publish to your org with `nx release`
|
||||
|
||||
Nx plugins that are located within an existing Nx workspace can be run directly, without the need to build, bundle, or package. They just work and respond to changes just as quickly as any other project in your workspace.
|
||||
|
||||
Since we’re the monorepo people, it might seem wild to suggest that you would have multiple monorepos in your organization; but this is a common scenario, and we whole-heartedly support it.
|
||||
|
||||
To support consistency across your org, you can publish this plugin so that all of your Nx workspaces share the same generators and inferred tasks you just created. This makes onboarding any new Nx workspace easier and more consistent. The generator for your plugin will include configuration for [`nx release`](/features/manage-releases) so that you’re ready to publish immediately:
|
||||
|
||||
```bash
|
||||
nx release --first-release
|
||||
```
|
||||
|
||||
If you want to test your package by publishing locally, your project will also be set up with a [Verdaccio configuration](/nx-api/js/executors/verdaccio) that allows you to run a local registry for testing your new plugin locally:
|
||||
|
||||
```bash
|
||||
nx local-registry
|
||||
```
|
||||
|
||||
## Presets to create your workspace the way you want it, every time
|
||||
|
||||
If you’re publishing a plugin for multiple workspaces in your organization, you’ll want those new workspaces to be created as consistently as your projects. When you create an Nx workspace, you might use a preset like this:
|
||||
|
||||
```shell
|
||||
npx create-nx-workspace@latest react-monorepo --preset=react-monorepo
|
||||
```
|
||||
|
||||
You can [create this same type of preset for your org](/extending-nx/recipes/create-preset), so that new workspaces are set up the same way each time:
|
||||
|
||||
```shell
|
||||
npx create-nx-workspace@latest react-monorepo --preset=org-react
|
||||
```
|
||||
|
||||
Better yet, you can [create your own install package](/extending-nx/recipes/create-install-package), so calling `create-org-workspace` becomes your new standard instead of calling `create-nx-workspace:`
|
||||
|
||||
```shell
|
||||
npx create-org-workspace@latest react-monorepo --framework=react
|
||||
```
|
||||
|
||||
{% youtube src="https://www.youtube.com/watch?v=ocllb5KEXZk" /%}
|
||||
|
||||
## What else can a custom plugin provide?
|
||||
|
||||
Your plugin can provide _anything an existing Nx plugin provides._ This includes, but is not limited to:
|
||||
|
||||
- [Generators](/extending-nx/recipes/local-generators)
|
||||
- [Task inference](/extending-nx/tutorials/tooling-plugin)
|
||||
- [Custom eslint rules](/nx-api/eslint/generators/workspace-rule#nxeslintworkspacerule)
|
||||
- [Migrations](/extending-nx/recipes/migration-generators)
|
||||
- Shared tool configs
|
||||
- CI pipeline starters
|
||||
|
||||
## Start consistent, stay consistent
|
||||
|
||||
Small changes to how Nx is used in your organization can make a big difference. All of these options to tailor Nx to your organization make the right thing to do, the easy thing to do. When your tooling is easier to use than doing it wrong, your engineers are more likely to adopt conventions and maintain them.
|
||||
|
||||
## Learn More
|
||||
|
||||
- [Enforce Organizational Best Practices with a Local Plugin](/extending-nx/tutorials/organization-specific-plugin)
|
||||
- [Create a Tooling Plugin](/extending-nx/tutorials/tooling-plugin)
|
||||
|
||||
Also, make sure to check out:
|
||||
|
||||
- [Nx Docs](https://www.notion.so/getting-started/intro)
|
||||
- [X/Twitter](https://twitter.com/nxdevtools)
|
||||
- [LinkedIn](https://www.linkedin.com/company/nrwl/)
|
||||
- [Bluesky](https://bsky.app/profile/nx.dev)
|
||||
- [Nx GitHub](https://github.com/nrwl/nx)
|
||||
- [Nx Official Discord Server](https://go.nx.dev/community)
|
||||
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
|
||||
- [Speed up your CI](/nx-cloud)
|
||||
@@ -0,0 +1,154 @@
|
||||
---
|
||||
title: Angular State Management for 2025
|
||||
slug: angular-state-management-2025
|
||||
authors: ['Mike Hartington']
|
||||
tags: [angular]
|
||||
cover_image: /blog/images/2024-12-16/thumbnail.png
|
||||
---
|
||||
|
||||
## Revisiting State Management
|
||||
|
||||
The topic of state management in apps is something developers can spend countless hours discussing and never agree on what the "right" solution is. Truth is, there are so many solutions out there these days and they all share similar concepts that you can't really pick wrong. This is true in most frontend frameworks, but especially true in Angular, where the framework has introduced several new features in the past year that make managing state simpler than ever. Let's take a look at some approaches to state management in Angular that take advantage of modern features of the framework and can set us up for success in 2025.
|
||||
|
||||
## Signals Only, No Library
|
||||
|
||||
In recent versions of Angular, the framework has introduced a new primitive called Signals. Signals provide a way to store a value, update that value, and react to when that value changes. This sounds like features that you would get from a full featured state management library. The benefit of using Signals without any additional libraries is that you can make things work for you how ever you want. If you have opinions on how you want to construct your state and manage updates, raw Signals can accommodate this.
|
||||
|
||||
```ts
|
||||
@Component({
|
||||
template: `
|
||||
<p>Hello, {{ name() }}</p>
|
||||
<button (click)="updateName()">Update</button>
|
||||
`,
|
||||
})
|
||||
export class MessageComponent {
|
||||
name = signal('World');
|
||||
constructor() {
|
||||
effect(() => {
|
||||
console.log('Name has changed: ', this.name());
|
||||
});
|
||||
}
|
||||
updateName() {
|
||||
this.name.set('Mike');
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The built-in methods on the `signal` make creating a simple local store very easy to do. If you take Signals and utilize a service, you create your own mini-store.
|
||||
|
||||
```ts
|
||||
export class AppStore {
|
||||
readonly state = signal([]);
|
||||
|
||||
add(item) {
|
||||
this.state.update((oldState) => [...oldState, item]);
|
||||
}
|
||||
delete(item) {
|
||||
this.state.update((oldState) => oldState.filter((e) => e.id !== item.id));
|
||||
}
|
||||
update(item) {
|
||||
this.state.update((oldState) =>
|
||||
oldState.map((e) => (e.id === item.id ? item : e))
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Now this is just a very basic approach to managing state, but if you do not want to reach for an additional libray, you could get pretty far with this basic solution. Throw a few `effect`s in there if you need to perform some side effects, and you're golden.
|
||||
|
||||
## Signal State
|
||||
|
||||
If you've been around Angular long enough, you've probably reached for NgRx before, and with good reason. NgRx provides a standard way of managing state in your app that is scalable and testable. In the past, NgRx has provided a store solution based on RxJS, but in more recent releases, NgRx provides two new API based on Signals, Signal State and Signal Store.
|
||||
|
||||
Signal State is a lightweight API meant to be used in smaller, more isolated scenarios, where a full redux-like API isn't needed. This could be in small to medium sized apps, and in the component itself or extracted to a service.
|
||||
|
||||
Reworking our previous example, we can take our signal-based store and update it to use Signal State:
|
||||
|
||||
```ts
|
||||
import { patchState, signalState } from '@ngrx/signals';
|
||||
export class AppStore {
|
||||
readonly state = signalState<Store>({ items: [] });
|
||||
|
||||
addToStore(item: StoreItem) {
|
||||
patchState(this.state, (oldState) => ({
|
||||
...oldState,
|
||||
items: [...oldState.items, item],
|
||||
}));
|
||||
}
|
||||
removeFromStore(item: StoreItem) {
|
||||
patchState(this.state, (oldState) => ({
|
||||
...oldState,
|
||||
items: oldState.items.filter((e) => e.id !== item.id),
|
||||
}));
|
||||
}
|
||||
updateStore(item: StoreItem) {
|
||||
patchState(this.state, (oldState) => ({
|
||||
...oldState,
|
||||
items: oldState.items.map((e) =>
|
||||
e.id === item.id ? { ...item, name: 'bar' } : e
|
||||
),
|
||||
}));
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Instantly, some things should stand out to you. First, we use the new `signalState` function, instead of the raw `signal` API. Now we can have a more type safe mechanism for interacting with our state. Second, we're no long passing an array. `signalState` only accepts an object/record like value. If you need an array, you put that on a property of the state.
|
||||
|
||||
Finally, the way we interact with our state is different. Instead of manipulating the state directly, we use the `patchState` function instead. `patchState` takes the state we want to manipulate, and uses a function to return a new version of that state. To add a new item to our `items` object, we can simply use the spread operator. Removing an item means we use `filter`, and updating an item means we use `map`. What's great about this is not only are we doing things in an immutable way, we're also getting all the types from our state. If we pass along a type that our state doesn't recognize, we'll get a type error before we even save.
|
||||
|
||||
## Signal Store
|
||||
|
||||
So Signal State is a more prescriptive way of handling smaller state, be it in a component or service. What is Signal Store all about? Signal Store is the more robust solution that you would expect for NgRx. It still is based on Signals, keeping the structure that most larger teams would want for this state solutions. Again, let's rework our previous example and update it for Signal Store.
|
||||
|
||||
```ts
|
||||
const AppStore = signalStore(
|
||||
withState<Store>({
|
||||
items: [],
|
||||
}),
|
||||
withMethods((state) => ({
|
||||
addToStore(item: StoreItem) {
|
||||
patchState(state, (oldState) => ({
|
||||
...oldState,
|
||||
items: [...oldState.items, item],
|
||||
}));
|
||||
},
|
||||
removeFromStore(item: StoreItem) {
|
||||
patchState(state, (oldState) => ({
|
||||
...oldState,
|
||||
items: oldState.items.filter((e) => e.id !== item.id),
|
||||
}));
|
||||
},
|
||||
updateStore(item: StoreItem) {
|
||||
patchState(state, (oldState) => ({
|
||||
...oldState,
|
||||
items: oldState.items.map((e) =>
|
||||
e.id === item.id ? { ...item, name: 'bar' } : e
|
||||
),
|
||||
}));
|
||||
},
|
||||
}))
|
||||
);
|
||||
```
|
||||
|
||||
Here, we're starting to see a more structured approach to managing state that isolates our state interactions from the rest of our app. Instead of creating a service, we use the `signalStore` function instead. `signalStore` will return an injectable service instead that we provide to a component, or our root app instance. From here, we pass a `withState` function to provide any actual state value to the store. Like `signalState`, this is an object/record only.
|
||||
|
||||
For modifying our store, we can use the `withMethods` function and pass any methods we want to expose to our app. What stands out here is that our store's value is accessible without having to inject it. Similar to `signalState`, we use the `patchState` to make any changes we need. Since the mechanism to modify the store in `signalStore` is very close to what we had in `signalState`, it's very approachable when migrating from your simple local store to something more full featured. So if your app and team grow significantly, this is a great path forward.
|
||||
|
||||
## Parting Thoughts
|
||||
|
||||
If you've tried managing state using something like NgRx or other redux-inspired APIs, signal-based solutions are a breath of fresh air. Whether you are just building a small app and just want to use the raw signal API, or if you are in a large enterprise and want a structured approach to managing things, Signal State or Signal Store are both excellent solutions. Check out the Angular docs on the Signals or NgRx's docs on Signal State or Signal Store
|
||||
|
||||
- [Signals](https://angular.dev/essentials/signals)
|
||||
- [Signal State](https://ngrx.io/guide/signals/signal-state)
|
||||
- [Signal Store](https://ngrx.io/guide/signals/signal-store)
|
||||
|
||||
Also, make sure to check out:
|
||||
|
||||
- [Nx Docs](https://www.notion.so/getting-started/intro)
|
||||
- [X/Twitter](https://twitter.com/nxdevtools)
|
||||
- [LinkedIn](https://www.linkedin.com/company/nrwl/)
|
||||
- [Bluesky](https://bsky.app/profile/nx.dev)
|
||||
- [Nx GitHub](https://github.com/nrwl/nx)
|
||||
- [Nx Official Discord Server](https://go.nx.dev/community)
|
||||
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
|
||||
- [Speed up your CI](/nx-cloud)
|
||||
|
After Width: | Height: | Size: 13 MiB |
|
After Width: | Height: | Size: 133 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 395 KiB |
|
After Width: | Height: | Size: 716 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 3.0 MiB |
|
After Width: | Height: | Size: 705 KiB |
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'Automate Task Pipelines to Build Before next start'
|
||||
title: 'Create a Task Pipeline to Build Your Next app Before Serving it'
|
||||
videoUrl: 'https://youtu.be/_U4hu6SuBaY'
|
||||
duration: '3:07'
|
||||
---
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'Configure CI to Access Remote Caching'
|
||||
title: 'Enable Read/Write Access to your Nx Remote Cache from CI'
|
||||
videoUrl: 'https://youtu.be/vBokLJ_F8qs'
|
||||
duration: '1:45'
|
||||
---
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'Run Tasks in Parallel on Different Machines on CI'
|
||||
title: 'Speed Up CI by Running Tasks in Parallel on Different Machines'
|
||||
videoUrl: 'https://youtu.be/lO_p4tA6IZI'
|
||||
duration: '2:08'
|
||||
---
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'Split Playwright e2e Tests for a Faster CI'
|
||||
title: 'Run Playwright E2E Tests Faster by Parallelizing Them on CI'
|
||||
videoUrl: 'https://youtu.be/42XnmzxEXM8'
|
||||
duration: '5:47'
|
||||
---
|
||||
|
||||
@@ -39,12 +39,12 @@
|
||||
],
|
||||
"executors": [
|
||||
{
|
||||
"description": "Compile and bundle an Nx Conformance Rule",
|
||||
"file": "external-generated/packages/powerpack-conformance/executors/bundle-rule.json",
|
||||
"description": "Compile and bundle one or more Nx Conformance Rules",
|
||||
"file": "external-generated/packages/powerpack-conformance/executors/bundle-rules.json",
|
||||
"hidden": false,
|
||||
"name": "bundle-rule",
|
||||
"originalFilePath": "/libs/nx-packages/powerpack-conformance/src/executors/bundle-rule/schema.json",
|
||||
"path": "powerpack-conformance/executors/bundle-rule",
|
||||
"name": "bundle-rules",
|
||||
"originalFilePath": "/libs/nx-packages/powerpack-conformance/src/executors/bundle-rules/schema.json",
|
||||
"path": "powerpack-conformance/executors/bundle-rules",
|
||||
"type": "executor"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "bundle-rules",
|
||||
"implementation": "/libs/nx-packages/powerpack-conformance/src/executors/bundle-rules/executor.ts",
|
||||
"schema": {
|
||||
"$schema": "https://json-schema.org/schema",
|
||||
"version": 2,
|
||||
"title": "BundleNxConformanceRules",
|
||||
"description": "Compile and bundle one or more Nx Conformance Rules",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"outputPath": {
|
||||
"type": "string",
|
||||
"description": "The output path for the bundled rules to be written to"
|
||||
}
|
||||
},
|
||||
"required": ["outputPath"],
|
||||
"presets": []
|
||||
},
|
||||
"description": "Compile and bundle one or more Nx Conformance Rules",
|
||||
"aliases": [],
|
||||
"hidden": false,
|
||||
"path": "/libs/nx-packages/powerpack-conformance/src/executors/bundle-rules/schema.json",
|
||||
"type": "executor"
|
||||
}
|
||||
@@ -28,6 +28,7 @@ Install `create-nx-workspace` globally to invoke the command directly, or use `n
|
||||
| `--defaultBase` | string | Default base to use for new projects. (Default: `main`) |
|
||||
| `--docker` | boolean | Generate a Dockerfile for the Node API. |
|
||||
| `--e2eTestRunner` | `playwright`, `cypress`, `none` | Test runner to use for end to end (E2E) tests. |
|
||||
| `--formatter` | string | Code formatter to use. |
|
||||
| `--framework` | string | Framework option to be used with certain stacks. |
|
||||
| `--help` | boolean | Show help. |
|
||||
| `--interactive` | boolean | Enable interactive mode with presets. (Default: `true`) |
|
||||
@@ -45,6 +46,7 @@ Install `create-nx-workspace` globally to invoke the command directly, or use `n
|
||||
| `--style` | string | Stylesheet type to be used with certain stacks. |
|
||||
| `--useGitHub` | boolean | Will you be using GitHub as your git hosting provider? (Default: `false`) |
|
||||
| `--version` | boolean | Show version number. |
|
||||
| `--workspaces` | boolean | Use package manager workspaces. (Default: `false`) |
|
||||
| `--workspaceType` | `integrated`, `package-based`, `standalone` | The type of workspace to create. |
|
||||
|
||||
## Presets
|
||||
|
||||
@@ -8,7 +8,7 @@ A node describing a project in a workspace
|
||||
|
||||
- [data](../../devkit/documents/ProjectGraphProjectNode#data): ProjectConfiguration & Object
|
||||
- [name](../../devkit/documents/ProjectGraphProjectNode#name): string
|
||||
- [type](../../devkit/documents/ProjectGraphProjectNode#type): "app" | "e2e" | "lib"
|
||||
- [type](../../devkit/documents/ProjectGraphProjectNode#type): "lib" | "app" | "e2e"
|
||||
|
||||
## Properties
|
||||
|
||||
@@ -28,4 +28,4 @@ Additional metadata about a project
|
||||
|
||||
### type
|
||||
|
||||
• **type**: `"app"` \| `"e2e"` \| `"lib"`
|
||||
• **type**: `"lib"` \| `"app"` \| `"e2e"`
|
||||
|
||||
@@ -847,6 +847,40 @@
|
||||
"isExternal": false,
|
||||
"path": "/ci/recipes/enterprise/dte",
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"id": "conformance",
|
||||
"name": "Conformance",
|
||||
"description": "Conformance features that are available to Nx Cloud Enterprise customers",
|
||||
"mediaImage": "",
|
||||
"file": "",
|
||||
"itemList": [
|
||||
{
|
||||
"id": "configure-conformance-rules-in-nx-cloud",
|
||||
"name": "Configure Conformance Rules in Nx Cloud",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "nx-cloud/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
|
||||
"tags": ["conformance"]
|
||||
},
|
||||
{
|
||||
"id": "publish-conformance-rules-to-nx-cloud",
|
||||
"name": "Publish Conformance Rules to Nx Cloud",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "nx-cloud/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
|
||||
"tags": ["conformance"]
|
||||
}
|
||||
],
|
||||
"isExternal": false,
|
||||
"path": "/ci/recipes/enterprise/conformance",
|
||||
"tags": []
|
||||
}
|
||||
],
|
||||
"isExternal": false,
|
||||
@@ -1420,6 +1454,40 @@
|
||||
"isExternal": false,
|
||||
"path": "/ci/recipes/enterprise/dte",
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"id": "conformance",
|
||||
"name": "Conformance",
|
||||
"description": "Conformance features that are available to Nx Cloud Enterprise customers",
|
||||
"mediaImage": "",
|
||||
"file": "",
|
||||
"itemList": [
|
||||
{
|
||||
"id": "configure-conformance-rules-in-nx-cloud",
|
||||
"name": "Configure Conformance Rules in Nx Cloud",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "nx-cloud/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
|
||||
"tags": ["conformance"]
|
||||
},
|
||||
{
|
||||
"id": "publish-conformance-rules-to-nx-cloud",
|
||||
"name": "Publish Conformance Rules to Nx Cloud",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "nx-cloud/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
|
||||
"tags": ["conformance"]
|
||||
}
|
||||
],
|
||||
"isExternal": false,
|
||||
"path": "/ci/recipes/enterprise/conformance",
|
||||
"tags": []
|
||||
}
|
||||
],
|
||||
"isExternal": false,
|
||||
@@ -1736,6 +1804,62 @@
|
||||
"path": "/ci/recipes/enterprise/dte/jenkins-dte",
|
||||
"tags": []
|
||||
},
|
||||
"/ci/recipes/enterprise/conformance": {
|
||||
"id": "conformance",
|
||||
"name": "Conformance",
|
||||
"description": "Conformance features that are available to Nx Cloud Enterprise customers",
|
||||
"mediaImage": "",
|
||||
"file": "",
|
||||
"itemList": [
|
||||
{
|
||||
"id": "configure-conformance-rules-in-nx-cloud",
|
||||
"name": "Configure Conformance Rules in Nx Cloud",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "nx-cloud/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
|
||||
"tags": ["conformance"]
|
||||
},
|
||||
{
|
||||
"id": "publish-conformance-rules-to-nx-cloud",
|
||||
"name": "Publish Conformance Rules to Nx Cloud",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "nx-cloud/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
|
||||
"tags": ["conformance"]
|
||||
}
|
||||
],
|
||||
"isExternal": false,
|
||||
"path": "/ci/recipes/enterprise/conformance",
|
||||
"tags": []
|
||||
},
|
||||
"/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud": {
|
||||
"id": "configure-conformance-rules-in-nx-cloud",
|
||||
"name": "Configure Conformance Rules in Nx Cloud",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "nx-cloud/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
|
||||
"tags": ["conformance"]
|
||||
},
|
||||
"/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud": {
|
||||
"id": "publish-conformance-rules-to-nx-cloud",
|
||||
"name": "Publish Conformance Rules to Nx Cloud",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "nx-cloud/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
|
||||
"tags": ["conformance"]
|
||||
},
|
||||
"/ci/recipes/other": {
|
||||
"id": "other",
|
||||
"name": "Other",
|
||||
|
||||
@@ -1268,6 +1268,14 @@
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Updating Version References in Manifest Files (e.g. package.json)",
|
||||
"path": "/recipes/nx-release/updating-version-references",
|
||||
"id": "updating-version-references",
|
||||
"isExternal": false,
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Automatically Version with Conventional Commits",
|
||||
"path": "/recipes/nx-release/automatically-version-with-conventional-commits",
|
||||
@@ -1340,14 +1348,6 @@
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Publish a Custom Dist Directory",
|
||||
"path": "/recipes/nx-release/publish-custom-dist-directory",
|
||||
"id": "publish-custom-dist-directory",
|
||||
"isExternal": false,
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Build Before Versioning",
|
||||
"path": "/recipes/nx-release/build-before-versioning",
|
||||
@@ -2417,6 +2417,14 @@
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Updating Version References in Manifest Files (e.g. package.json)",
|
||||
"path": "/recipes/nx-release/updating-version-references",
|
||||
"id": "updating-version-references",
|
||||
"isExternal": false,
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Automatically Version with Conventional Commits",
|
||||
"path": "/recipes/nx-release/automatically-version-with-conventional-commits",
|
||||
@@ -2489,14 +2497,6 @@
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Publish a Custom Dist Directory",
|
||||
"path": "/recipes/nx-release/publish-custom-dist-directory",
|
||||
"id": "publish-custom-dist-directory",
|
||||
"isExternal": false,
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Build Before Versioning",
|
||||
"path": "/recipes/nx-release/build-before-versioning",
|
||||
@@ -2532,6 +2532,14 @@
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Updating Version References in Manifest Files (e.g. package.json)",
|
||||
"path": "/recipes/nx-release/updating-version-references",
|
||||
"id": "updating-version-references",
|
||||
"isExternal": false,
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Automatically Version with Conventional Commits",
|
||||
"path": "/recipes/nx-release/automatically-version-with-conventional-commits",
|
||||
@@ -2604,14 +2612,6 @@
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Publish a Custom Dist Directory",
|
||||
"path": "/recipes/nx-release/publish-custom-dist-directory",
|
||||
"id": "publish-custom-dist-directory",
|
||||
"isExternal": false,
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Build Before Versioning",
|
||||
"path": "/recipes/nx-release/build-before-versioning",
|
||||
@@ -6041,6 +6041,31 @@
|
||||
}
|
||||
],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Conformance",
|
||||
"path": "/ci/recipes/enterprise/conformance",
|
||||
"id": "conformance",
|
||||
"isExternal": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "Configure Conformance Rules in Nx Cloud",
|
||||
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
|
||||
"id": "configure-conformance-rules-in-nx-cloud",
|
||||
"isExternal": false,
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Publish Conformance Rules to Nx Cloud",
|
||||
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
|
||||
"id": "publish-conformance-rules-to-nx-cloud",
|
||||
"isExternal": false,
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
}
|
||||
],
|
||||
"disableCollapsible": false
|
||||
}
|
||||
],
|
||||
"disableCollapsible": false
|
||||
@@ -6459,6 +6484,31 @@
|
||||
}
|
||||
],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Conformance",
|
||||
"path": "/ci/recipes/enterprise/conformance",
|
||||
"id": "conformance",
|
||||
"isExternal": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "Configure Conformance Rules in Nx Cloud",
|
||||
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
|
||||
"id": "configure-conformance-rules-in-nx-cloud",
|
||||
"isExternal": false,
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Publish Conformance Rules to Nx Cloud",
|
||||
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
|
||||
"id": "publish-conformance-rules-to-nx-cloud",
|
||||
"isExternal": false,
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
}
|
||||
],
|
||||
"disableCollapsible": false
|
||||
}
|
||||
],
|
||||
"disableCollapsible": false
|
||||
@@ -6689,6 +6739,47 @@
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Conformance",
|
||||
"path": "/ci/recipes/enterprise/conformance",
|
||||
"id": "conformance",
|
||||
"isExternal": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "Configure Conformance Rules in Nx Cloud",
|
||||
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
|
||||
"id": "configure-conformance-rules-in-nx-cloud",
|
||||
"isExternal": false,
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Publish Conformance Rules to Nx Cloud",
|
||||
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
|
||||
"id": "publish-conformance-rules-to-nx-cloud",
|
||||
"isExternal": false,
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
}
|
||||
],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Configure Conformance Rules in Nx Cloud",
|
||||
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
|
||||
"id": "configure-conformance-rules-in-nx-cloud",
|
||||
"isExternal": false,
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Publish Conformance Rules to Nx Cloud",
|
||||
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
|
||||
"id": "publish-conformance-rules-to-nx-cloud",
|
||||
"isExternal": false,
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Other",
|
||||
"path": "/ci/recipes/other",
|
||||
@@ -9794,6 +9885,40 @@
|
||||
"isExternal": false,
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"id": "rsbuild",
|
||||
"path": "/nx-api/rsbuild",
|
||||
"name": "rsbuild",
|
||||
"children": [
|
||||
{
|
||||
"id": "generators",
|
||||
"path": "/nx-api/rsbuild/generators",
|
||||
"name": "generators",
|
||||
"children": [
|
||||
{
|
||||
"id": "init",
|
||||
"path": "/nx-api/rsbuild/generators/init",
|
||||
"name": "init",
|
||||
"children": [],
|
||||
"isExternal": false,
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"id": "configuration",
|
||||
"path": "/nx-api/rsbuild/generators/configuration",
|
||||
"name": "configuration",
|
||||
"children": [],
|
||||
"isExternal": false,
|
||||
"disableCollapsible": false
|
||||
}
|
||||
],
|
||||
"isExternal": false,
|
||||
"disableCollapsible": false
|
||||
}
|
||||
],
|
||||
"isExternal": false,
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"id": "rspack",
|
||||
"path": "/nx-api/rspack",
|
||||
@@ -10643,9 +10768,9 @@
|
||||
"name": "executors",
|
||||
"children": [
|
||||
{
|
||||
"id": "bundle-rule",
|
||||
"path": "/nx-api/powerpack-conformance/executors/bundle-rule",
|
||||
"name": "bundle-rule",
|
||||
"id": "bundle-rules",
|
||||
"path": "/nx-api/powerpack-conformance/executors/bundle-rules",
|
||||
"name": "bundle-rules",
|
||||
"children": [],
|
||||
"isExternal": false,
|
||||
"disableCollapsible": false
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
"type": "executor"
|
||||
},
|
||||
"/nx-api/angular/executors/application": {
|
||||
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities. _Note: this is only supported in Angular versions >= 17.0.0_.",
|
||||
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities.",
|
||||
"file": "generated/packages/angular/executors/application.json",
|
||||
"hidden": false,
|
||||
"name": "application",
|
||||
@@ -200,7 +200,7 @@
|
||||
"type": "generator"
|
||||
},
|
||||
"/nx-api/angular/generators/convert-to-application-executor": {
|
||||
"description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder. _Note: this is only supported in Angular versions >= 17.0.0_.",
|
||||
"description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder.",
|
||||
"file": "generated/packages/angular/generators/convert-to-application-executor.json",
|
||||
"hidden": false,
|
||||
"name": "convert-to-application-executor",
|
||||
@@ -2891,6 +2891,37 @@
|
||||
},
|
||||
"path": "/nx-api/rollup"
|
||||
},
|
||||
"rsbuild": {
|
||||
"githubRoot": "https://github.com/nrwl/nx/blob/master",
|
||||
"name": "rsbuild",
|
||||
"packageName": "@nx/rsbuild",
|
||||
"description": "The Nx Plugin for Rsbuild contains an Nx plugin, executors and utilities that support building applications using Rsbuild.",
|
||||
"documents": {},
|
||||
"root": "/packages/rsbuild",
|
||||
"source": "/packages/rsbuild/src",
|
||||
"executors": {},
|
||||
"generators": {
|
||||
"/nx-api/rsbuild/generators/init": {
|
||||
"description": "Initialize the `@nx/rsbuild` plugin.",
|
||||
"file": "generated/packages/rsbuild/generators/init.json",
|
||||
"hidden": true,
|
||||
"name": "init",
|
||||
"originalFilePath": "/packages/rsbuild/src/generators/init/schema.json",
|
||||
"path": "/nx-api/rsbuild/generators/init",
|
||||
"type": "generator"
|
||||
},
|
||||
"/nx-api/rsbuild/generators/configuration": {
|
||||
"description": "Add an Rsbuild configuration for the provided project.",
|
||||
"file": "generated/packages/rsbuild/generators/configuration.json",
|
||||
"hidden": false,
|
||||
"name": "configuration",
|
||||
"originalFilePath": "/packages/rsbuild/src/generators/configuration/schema.json",
|
||||
"path": "/nx-api/rsbuild/generators/configuration",
|
||||
"type": "generator"
|
||||
}
|
||||
},
|
||||
"path": "/nx-api/rsbuild"
|
||||
},
|
||||
"rspack": {
|
||||
"githubRoot": "https://github.com/nrwl/nx/blob/master",
|
||||
"name": "rspack",
|
||||
@@ -3681,13 +3712,13 @@
|
||||
"root": "/libs/nx-packages/powerpack-conformance",
|
||||
"source": "/libs/nx-packages/powerpack-conformance/src",
|
||||
"executors": {
|
||||
"/nx-api/powerpack-conformance/executors/bundle-rule": {
|
||||
"description": "Compile and bundle an Nx Conformance Rule",
|
||||
"file": "external-generated/packages/powerpack-conformance/executors/bundle-rule.json",
|
||||
"/nx-api/powerpack-conformance/executors/bundle-rules": {
|
||||
"description": "Compile and bundle one or more Nx Conformance Rules",
|
||||
"file": "external-generated/packages/powerpack-conformance/executors/bundle-rules.json",
|
||||
"hidden": false,
|
||||
"name": "bundle-rule",
|
||||
"originalFilePath": "/libs/nx-packages/powerpack-conformance/src/executors/bundle-rule/schema.json",
|
||||
"path": "/nx-api/powerpack-conformance/executors/bundle-rule",
|
||||
"name": "bundle-rules",
|
||||
"originalFilePath": "/libs/nx-packages/powerpack-conformance/src/executors/bundle-rules/schema.json",
|
||||
"path": "/nx-api/powerpack-conformance/executors/bundle-rules",
|
||||
"type": "executor"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1737,6 +1737,17 @@
|
||||
"path": "/recipes/nx-release/release-projects-independently",
|
||||
"tags": ["nx-release"]
|
||||
},
|
||||
{
|
||||
"id": "updating-version-references",
|
||||
"name": "Updating Version References in Manifest Files (e.g. package.json)",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "shared/recipes/nx-release/updating-version-references",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/nx-release/updating-version-references",
|
||||
"tags": ["nx-release"]
|
||||
},
|
||||
{
|
||||
"id": "automatically-version-with-conventional-commits",
|
||||
"name": "Automatically Version with Conventional Commits",
|
||||
@@ -1836,17 +1847,6 @@
|
||||
"path": "/recipes/nx-release/configure-changelog-format",
|
||||
"tags": ["nx-release"]
|
||||
},
|
||||
{
|
||||
"id": "publish-custom-dist-directory",
|
||||
"name": "Publish a Custom Dist Directory",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "shared/recipes/nx-release/publish-custom-dist-directory",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/nx-release/publish-custom-dist-directory",
|
||||
"tags": ["nx-release"]
|
||||
},
|
||||
{
|
||||
"id": "build-before-versioning",
|
||||
"name": "Build Before Versioning",
|
||||
@@ -3311,6 +3311,17 @@
|
||||
"path": "/recipes/nx-release/release-projects-independently",
|
||||
"tags": ["nx-release"]
|
||||
},
|
||||
{
|
||||
"id": "updating-version-references",
|
||||
"name": "Updating Version References in Manifest Files (e.g. package.json)",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "shared/recipes/nx-release/updating-version-references",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/nx-release/updating-version-references",
|
||||
"tags": ["nx-release"]
|
||||
},
|
||||
{
|
||||
"id": "automatically-version-with-conventional-commits",
|
||||
"name": "Automatically Version with Conventional Commits",
|
||||
@@ -3410,17 +3421,6 @@
|
||||
"path": "/recipes/nx-release/configure-changelog-format",
|
||||
"tags": ["nx-release"]
|
||||
},
|
||||
{
|
||||
"id": "publish-custom-dist-directory",
|
||||
"name": "Publish a Custom Dist Directory",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "shared/recipes/nx-release/publish-custom-dist-directory",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/nx-release/publish-custom-dist-directory",
|
||||
"tags": ["nx-release"]
|
||||
},
|
||||
{
|
||||
"id": "build-before-versioning",
|
||||
"name": "Build Before Versioning",
|
||||
@@ -3470,6 +3470,17 @@
|
||||
"path": "/recipes/nx-release/release-projects-independently",
|
||||
"tags": ["nx-release"]
|
||||
},
|
||||
"/recipes/nx-release/updating-version-references": {
|
||||
"id": "updating-version-references",
|
||||
"name": "Updating Version References in Manifest Files (e.g. package.json)",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "shared/recipes/nx-release/updating-version-references",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/nx-release/updating-version-references",
|
||||
"tags": ["nx-release"]
|
||||
},
|
||||
"/recipes/nx-release/automatically-version-with-conventional-commits": {
|
||||
"id": "automatically-version-with-conventional-commits",
|
||||
"name": "Automatically Version with Conventional Commits",
|
||||
@@ -3569,17 +3580,6 @@
|
||||
"path": "/recipes/nx-release/configure-changelog-format",
|
||||
"tags": ["nx-release"]
|
||||
},
|
||||
"/recipes/nx-release/publish-custom-dist-directory": {
|
||||
"id": "publish-custom-dist-directory",
|
||||
"name": "Publish a Custom Dist Directory",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "shared/recipes/nx-release/publish-custom-dist-directory",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/recipes/nx-release/publish-custom-dist-directory",
|
||||
"tags": ["nx-release"]
|
||||
},
|
||||
"/recipes/nx-release/build-before-versioning": {
|
||||
"id": "build-before-versioning",
|
||||
"name": "Build Before Versioning",
|
||||
|
||||
@@ -497,6 +497,13 @@
|
||||
"name": "Release Projects Independently",
|
||||
"path": "/recipes/nx-release/release-projects-independently"
|
||||
},
|
||||
{
|
||||
"description": "",
|
||||
"file": "shared/recipes/nx-release/updating-version-references",
|
||||
"id": "updating-version-references",
|
||||
"name": "Updating Version References in Manifest Files (e.g. package.json)",
|
||||
"path": "/recipes/nx-release/updating-version-references"
|
||||
},
|
||||
{
|
||||
"description": "",
|
||||
"file": "shared/recipes/nx-release/automatically-version-with-conventional-commits",
|
||||
@@ -560,13 +567,6 @@
|
||||
"name": "Configure Changelog Format",
|
||||
"path": "/recipes/nx-release/configure-changelog-format"
|
||||
},
|
||||
{
|
||||
"description": "",
|
||||
"file": "shared/recipes/nx-release/publish-custom-dist-directory",
|
||||
"id": "publish-custom-dist-directory",
|
||||
"name": "Publish a Custom Dist Directory",
|
||||
"path": "/recipes/nx-release/publish-custom-dist-directory"
|
||||
},
|
||||
{
|
||||
"description": "",
|
||||
"file": "shared/recipes/nx-release/build-before-versioning",
|
||||
@@ -1235,6 +1235,20 @@
|
||||
"id": "conformance",
|
||||
"name": "Run Language-Agnostic Conformance Rules",
|
||||
"path": "/nx-enterprise/powerpack/conformance"
|
||||
},
|
||||
{
|
||||
"description": "",
|
||||
"file": "nx-cloud/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
|
||||
"id": "configure-conformance-rules-in-nx-cloud",
|
||||
"name": "Configure Conformance Rules in Nx Cloud",
|
||||
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud"
|
||||
},
|
||||
{
|
||||
"description": "",
|
||||
"file": "nx-cloud/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
|
||||
"id": "publish-conformance-rules-to-nx-cloud",
|
||||
"name": "Publish Conformance Rules to Nx Cloud",
|
||||
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud"
|
||||
}
|
||||
],
|
||||
"owners": [
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
"type": "executor"
|
||||
},
|
||||
{
|
||||
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities. _Note: this is only supported in Angular versions >= 17.0.0_.",
|
||||
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities.",
|
||||
"file": "generated/packages/angular/executors/application.json",
|
||||
"hidden": false,
|
||||
"name": "application",
|
||||
@@ -195,7 +195,7 @@
|
||||
"type": "generator"
|
||||
},
|
||||
{
|
||||
"description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder. _Note: this is only supported in Angular versions >= 17.0.0_.",
|
||||
"description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder.",
|
||||
"file": "generated/packages/angular/generators/convert-to-application-executor.json",
|
||||
"hidden": false,
|
||||
"name": "convert-to-application-executor",
|
||||
@@ -2865,6 +2865,36 @@
|
||||
"root": "/packages/rollup",
|
||||
"source": "/packages/rollup/src"
|
||||
},
|
||||
{
|
||||
"description": "The Nx Plugin for Rsbuild contains an Nx plugin, executors and utilities that support building applications using Rsbuild.",
|
||||
"documents": [],
|
||||
"executors": [],
|
||||
"generators": [
|
||||
{
|
||||
"description": "Initialize the `@nx/rsbuild` plugin.",
|
||||
"file": "generated/packages/rsbuild/generators/init.json",
|
||||
"hidden": true,
|
||||
"name": "init",
|
||||
"originalFilePath": "/packages/rsbuild/src/generators/init/schema.json",
|
||||
"path": "rsbuild/generators/init",
|
||||
"type": "generator"
|
||||
},
|
||||
{
|
||||
"description": "Add an Rsbuild configuration for the provided project.",
|
||||
"file": "generated/packages/rsbuild/generators/configuration.json",
|
||||
"hidden": false,
|
||||
"name": "configuration",
|
||||
"originalFilePath": "/packages/rsbuild/src/generators/configuration/schema.json",
|
||||
"path": "rsbuild/generators/configuration",
|
||||
"type": "generator"
|
||||
}
|
||||
],
|
||||
"githubRoot": "https://github.com/nrwl/nx/blob/master",
|
||||
"name": "rsbuild",
|
||||
"packageName": "@nx/rsbuild",
|
||||
"root": "/packages/rsbuild",
|
||||
"source": "/packages/rsbuild/src"
|
||||
},
|
||||
{
|
||||
"description": "The Nx Plugin for Rspack contains executors and generators that support building applications using Rspack.",
|
||||
"documents": [
|
||||
|
||||
@@ -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)_ |
|
||||
| --------------- | ------------------------------ | ---------------------------------------- |
|
||||
| ~19.0.0 | **latest** | >=20.2.0 <=latest |
|
||||
| ~18.2.0 | **latest** | >=19.6.0 <=latest |
|
||||
| ~18.1.0 | **latest** | >=19.5.0 <=latest |
|
||||
| ~18.0.0 | **latest** | >=19.1.0 <=latest |
|
||||
@@ -21,9 +22,9 @@ We provide a recommended version, and it is usually the latest minor version of
|
||||
| ~17.2.0 | **latest** | >=18.1.1 <=latest |
|
||||
| ~17.1.0 | **latest** | >=17.3.0 <=latest |
|
||||
| ~17.0.0 | **latest** | >=17.1.0 <=latest |
|
||||
| ~16.2.0 | **latest** | >=16.7.0 <=latest |
|
||||
| ~16.1.0 | **latest** | >=16.4.0 <=latest |
|
||||
| ~16.0.0 | **latest** | >=16.1.0 <=latest |
|
||||
| ~16.2.0 | **~20.1.0** | >=16.7.0 <20.2.0 |
|
||||
| ~16.1.0 | **~20.1.0** | >=16.4.0 <20.2.0 |
|
||||
| ~16.0.0 | **~20.1.0** | >=16.1.0 <20.2.0 |
|
||||
| ~15.2.0 | **~19.0.0** | >=15.8.0 <19.1.0 |
|
||||
| ~15.1.0 | **~19.0.0** | >=15.5.0 <19.1.0 |
|
||||
| ~15.0.0 | **~19.0.0** | >=15.2.0 <=15.4.8 \|\| >=15.7.0 <19.1.0 |
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"schema": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"title": "Schema for Nx Application Executor",
|
||||
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities. _Note: this is only supported in Angular versions >= 17.0.0_.",
|
||||
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities.",
|
||||
"examplesFile": "This executor is a drop-in replacement for the `@angular-devkit/build-angular:application` builder provided by the Angular CLI. It builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities.\n\nIn addition to the features provided by the Angular CLI builder, the `@nx/angular:application` executor also supports the following:\n\n- Providing esbuild plugins\n- Providing a function to transform the application's `index.html` file\n- Incremental builds\n\n{% callout type=\"check\" title=\"Dev Server\" %}\nThe [`@nx/angular:dev-server` executor](/nx-api/angular/executors/dev-server) is required to serve your application when using the `@nx/angular:application` to build it. It is a drop-in replacement for the Angular CLI's `@angular-devkit/build-angular:dev-server` builder and ensures the application is correctly served with Vite when using the `@nx/angular:application` executor.\n{% /callout %}\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Providing esbuild plugins\" %}\n\nThe executor accepts a `plugins` option that allows you to provide esbuild plugins that will be used when building your application. It allows providing a path to a plugin file or an object with a `path` and `options` property to provide options to the plugin.\n\n```json {% fileName=\"apps/my-app/project.json\" highlightLines=[\"8-16\"] %}\n{\n ...\n \"targets\": {\n \"build\": {\n \"executor\": \"@nx/angular:application\",\n \"options\": {\n ...\n \"plugins\": [\n \"apps/my-app/plugins/plugin1.js\",\n {\n \"path\": \"apps/my-app/plugins/plugin2.js\",\n \"options\": {\n \"someOption\": \"some value\"\n }\n }\n ]\n }\n }\n ...\n }\n}\n```\n\n```ts {% fileName=\"apps/my-app/plugins/plugin1.js\" %}\nconst plugin1 = {\n name: 'plugin1',\n setup(build) {\n const options = build.initialOptions;\n options.define.PLUGIN1_TEXT = '\"Value was provided at build time\"';\n },\n};\n\nmodule.exports = plugin1;\n```\n\n```ts {% fileName=\"apps/my-app/plugins/plugin2.js\" %}\nfunction plugin2({ someOption }) {\n return {\n name: 'plugin2',\n setup(build) {\n const options = build.initialOptions;\n options.define.PLUGIN2_TEXT = JSON.stringify(someOption);\n },\n };\n}\n\nmodule.exports = plugin2;\n```\n\nAdditionally, we need to inform TypeScript of the defined variables to prevent type-checking errors during the build. We can achieve this by creating or updating a type definition file included in the TypeScript build process (e.g. `src/types.d.ts`) with the following content:\n\n```ts {% fileName=\"apps/my-app/src/types.d.ts\" %}\ndeclare const PLUGIN1_TEXT: number;\ndeclare const PLUGIN2_TEXT: string;\n```\n\n{% /tab %}\n\n{% tab label=\"Transforming the 'index.html' file\" %}\n\nThe executor accepts an `indexHtmlTransformer` option to provide a path to a file with a default export for a function that receives the application's `index.html` file contents and outputs the updated contents.\n\n```json {% fileName=\"apps/my-app/project.json\" highlightLines=[8] %}\n{\n ...\n \"targets\": {\n \"build\": {\n \"executor\": \"@nx/angular:application\",\n \"options\": {\n ...\n \"indexHtmlTransformer\": \"apps/my-app/index-html.transformer.ts\"\n }\n }\n ...\n }\n}\n```\n\n```ts {% fileName=\"apps/my-app/index-html.transformer.ts\" %}\nexport default function (indexContent: string) {\n return indexContent.replace(\n '<title>my-app</title>',\n '<title>my-app (transformed)</title>'\n );\n}\n```\n\n{% /tab %}\n{% /tabs %}\n",
|
||||
"outputCapture": "direct-nodejs",
|
||||
"type": "object",
|
||||
@@ -55,7 +55,18 @@
|
||||
},
|
||||
"server": {
|
||||
"type": "string",
|
||||
"description": "The full path for the server entry point to the application, relative to the current workspace."
|
||||
"description": "The full path for the server entry point to the application, relative to the current workspace.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "The full path for the server entry point to the application, relative to the current workspace."
|
||||
},
|
||||
{
|
||||
"const": false,
|
||||
"type": "boolean",
|
||||
"description": "Indicates that a server entry point is not provided. _Note: this is only supported in Angular versions >= 19.0.0_."
|
||||
}
|
||||
]
|
||||
},
|
||||
"polyfills": {
|
||||
"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'.",
|
||||
@@ -71,6 +82,29 @@
|
||||
"type": "string",
|
||||
"description": "Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations. _Note: this is only supported in Angular versions >= 17.3.0_."
|
||||
},
|
||||
"security": {
|
||||
"description": "Security features to protect against XSS and other common attacks. _Note: this is only supported in Angular versions >= 19.0.0_.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"autoCsp": {
|
||||
"description": "Enables automatic generation of a hash-based Strict Content Security Policy (https://web.dev/articles/strict-csp#choose-hash) based on scripts in index.html. Will default to true once we are out of experimental/preview phases. It defaults to `false`.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"unsafeEval": {
|
||||
"type": "boolean",
|
||||
"description": "Include the `unsafe-eval` directive (https://web.dev/articles/strict-csp#remove-eval) in the auto-CSP. Please only enable this if you are absolutely sure that you need to, as allowing calls to eval will weaken the XSS defenses provided by the auto-CSP. It default to `false`."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
{ "type": "boolean" }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"description": "Global scripts to be included in the build.",
|
||||
"type": "array",
|
||||
@@ -157,6 +191,28 @@
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"default": []
|
||||
},
|
||||
"sass": {
|
||||
"description": "Options to pass to the sass preprocessor. _Note: this is only supported in Angular versions >= 19.0.0_.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fatalDeprecations": {
|
||||
"description": "A set of deprecations to treat as fatal. If a deprecation warning of any provided type is encountered during compilation, the compiler will error instead. If a Version is provided, then all deprecations that were active in that compiler version will be treated as fatal.",
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"silenceDeprecations": {
|
||||
"description": " A set of active deprecations to ignore. If a deprecation warning of any provided type is encountered during compilation, the compiler will ignore it instead.",
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"futureDeprecations": {
|
||||
"description": "A set of future deprecations to opt into early. Future deprecations passed here will be treated as active by the compiler, emitting warnings as necessary.",
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
@@ -546,8 +602,7 @@
|
||||
"default": []
|
||||
},
|
||||
"prerender": {
|
||||
"description": "Prerender (SSG) pages of your application during build time.",
|
||||
"default": false,
|
||||
"description": "Prerender (SSG) pages of your application during build time. It defaults to `false` in Angular versions < 19.0.0. Otherwise, the value will be `undefined`.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "boolean",
|
||||
@@ -584,6 +639,11 @@
|
||||
"entry": {
|
||||
"type": "string",
|
||||
"description": "The server entry-point that when executed will spawn the web server."
|
||||
},
|
||||
"experimentalPlatform": {
|
||||
"description": "Specifies the platform for which the server bundle is generated. This affects the APIs and modules available in the server-side code. \n\n- `node`: (Default) Generates a bundle optimized for Node.js environments. \n- `neutral`: Generates a platform-neutral bundle suitable for environments like edge workers, and other serverless platforms. This option avoids using Node.js-specific APIs, making the bundle more portable. \n\nPlease note that this feature does not provide polyfills for Node.js modules. Additionally, it is experimental, and the feature may undergo changes in future versions. _Note: this is only supported in Angular versions >= 19.0.0_.",
|
||||
"default": "node",
|
||||
"enum": ["node", "neutral"]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
@@ -592,8 +652,12 @@
|
||||
},
|
||||
"appShell": {
|
||||
"type": "boolean",
|
||||
"description": "Generates an application shell during build time.",
|
||||
"default": false
|
||||
"description": "Generates an application shell during build time. It defaults to `false` in Angular versions < 19.0.0. Otherwise, the value will be `undefined`."
|
||||
},
|
||||
"outputMode": {
|
||||
"type": "string",
|
||||
"description": "Defines the build output target. 'static': Generates a static site for deployment on any static hosting service. 'server': Produces an application designed for deployment on a server that supports server-side rendering (SSR). _Note: this is only supported in Angular versions >= 19.0.0_.",
|
||||
"enum": ["static", "server"]
|
||||
},
|
||||
"buildLibsFromSource": {
|
||||
"type": "boolean",
|
||||
@@ -739,7 +803,7 @@
|
||||
},
|
||||
"presets": []
|
||||
},
|
||||
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities. _Note: this is only supported in Angular versions >= 17.0.0_.",
|
||||
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities.",
|
||||
"aliases": [],
|
||||
"hidden": false,
|
||||
"path": "/packages/angular/src/executors/application/schema.json",
|
||||
|
||||
@@ -514,7 +514,7 @@
|
||||
"default": true
|
||||
},
|
||||
"plugins": {
|
||||
"description": "A list of ESBuild plugins. _Note: this is only supported in Angular versions >= 17.0.0_.",
|
||||
"description": "A list of ESBuild plugins.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"oneOf": [
|
||||
|
||||
@@ -93,8 +93,7 @@
|
||||
},
|
||||
"hmr": {
|
||||
"type": "boolean",
|
||||
"description": "Enable hot module replacement.",
|
||||
"default": false
|
||||
"description": "Enable hot module replacement. It defaults to `false` in Angular versions < 19.0.0. Otherwise, the value will be `undefined`."
|
||||
},
|
||||
"watch": {
|
||||
"type": "boolean",
|
||||
@@ -107,7 +106,7 @@
|
||||
},
|
||||
"forceEsbuild": {
|
||||
"type": "boolean",
|
||||
"description": "Force the development server to use the 'browser-esbuild' builder when building. This is a developer preview option for the esbuild-based build system. _Note: this is only supported in Angular versions >= 16.1.0_.",
|
||||
"description": "Force the development server to use the 'browser-esbuild' builder when building. This is a developer preview option for the esbuild-based build system.",
|
||||
"default": false
|
||||
},
|
||||
"inspect": {
|
||||
@@ -145,7 +144,7 @@
|
||||
"x-priority": "important"
|
||||
},
|
||||
"esbuildMiddleware": {
|
||||
"description": "A list of HTTP request middleware functions. _Note: this is only supported in Angular versions >= 17.0.0_.",
|
||||
"description": "A list of HTTP request middleware functions.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
|
||||
@@ -10,10 +10,6 @@
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"presets": [
|
||||
{
|
||||
"name": "Buildable Library with Tailwind",
|
||||
"keys": ["project", "tailwindConfig"]
|
||||
},
|
||||
{
|
||||
"name": "Updating Project Dependencies for Buildable Library",
|
||||
"keys": ["project"]
|
||||
@@ -39,10 +35,6 @@
|
||||
"poll": {
|
||||
"type": "number",
|
||||
"description": "Enable and define the file watching poll time period in milliseconds. _Note: this is only supported in Angular versions >= 18.0.0_."
|
||||
},
|
||||
"tailwindConfig": {
|
||||
"type": "string",
|
||||
"description": "The full path for the Tailwind configuration file, relative to the workspace root. If not provided and a `tailwind.config.js` file exists in the project or workspace root, it will be used. Otherwise, Tailwind will not be configured."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
||||
@@ -10,13 +10,6 @@
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"presets": [
|
||||
{
|
||||
"name": "Publishable Library with Tailwind",
|
||||
"keys": [
|
||||
"project",
|
||||
"tailwindConfig"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Updating Project Dependencies for Publishable Library",
|
||||
"keys": [
|
||||
@@ -44,12 +37,6 @@
|
||||
"poll": {
|
||||
"type": "number",
|
||||
"description": "Enable and define the file watching poll time period in milliseconds. _Note: this is only supported in Angular versions >= 18.0.0_."
|
||||
},
|
||||
"tailwindConfig": {
|
||||
"type": "string",
|
||||
"description": "The full path for the Tailwind configuration file, relative to the workspace root. If not provided and a `tailwind.config.js` file exists in the project or workspace root, it will be used. Otherwise, Tailwind will not be configured. _Note: starting with Angular v17, this option is no longer used and the configuration will be picked up if exists at the project or workspace root_.",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "tailwind.config@(.js|.cjs|.mjs|.ts)"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
||||
@@ -166,9 +166,10 @@
|
||||
"default": false
|
||||
},
|
||||
"bundler": {
|
||||
"description": "Bundler to use to build the application. It defaults to `esbuild` for Angular versions >= 17.0.0. Otherwise, it defaults to `webpack`. _Note: The `esbuild` bundler is only considered stable from Angular v17._",
|
||||
"description": "Bundler to use to build the application.",
|
||||
"type": "string",
|
||||
"enum": ["webpack", "esbuild"],
|
||||
"enum": ["esbuild", "webpack"],
|
||||
"default": "esbuild",
|
||||
"x-prompt": "Which bundler do you want to use to build the application?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
@@ -177,11 +178,15 @@
|
||||
"type": "boolean",
|
||||
"x-prompt": "Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)?",
|
||||
"default": false
|
||||
},
|
||||
"serverRouting": {
|
||||
"description": "Creates a server application using the Server Routing and App Engine APIs (Developer Preview). _Note: this is only supported in Angular versions >= 19.0.0_.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["directory"],
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Application\" %}\n\nCreate an application named `my-app`:\n\n```bash\nnx g @nx/angular:application apps/my-app\n```\n\n{% /tab %}\n\n{% tab label=\"Specify directory and style extension\" %}\n\nCreate an application named `my-app` in the `my-dir` directory and use `scss` for styles:\n\n{% callout type=\"note\" title=\"Directory Flag Behavior Changes\" %}\nThe command below uses the `as-provided` directory flag behavior, which is the default in Nx 16.8.0. If you're on an earlier version of Nx or using the `derived` option, use `--directory=my-dir`. See the [as-provided vs. derived documentation](/deprecated/as-provided-vs-derived) for more details.\n{% /callout %}\n\n```bash\nnx g @nx/angular:app my-dir/my-app --style=scss\n```\n\n{% /tab %}\n\n{% tab label=\"Single File Components application\" %}\n\nCreate an application with Single File Components (inline styles and inline templates):\n\n```bash\nnx g @nx/angular:app apps/my-app --inlineStyle --inlineTemplate\n```\n\n{% /tab %}\n\n{% tab label=\"Set custom prefix and tags\" %}\n\nSet the prefix to apply to generated selectors and add tags to the application (used for linting).\n\n```bash\nnx g @nx/angular:app apps/my-app --prefix=admin --tags=scope:admin,type:ui\n```\n\n{% /tab %}\n{% /tabs %}\n",
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Application\" %}\n\nCreate an application named `my-app`:\n\n```bash\nnx g @nx/angular:application apps/my-app\n```\n\n{% /tab %}\n\n{% tab label=\"Specify style extension\" %}\n\nCreate an application named `my-app` in the `my-dir` directory and use `scss` for styles:\n\n```bash\nnx g @nx/angular:app my-dir/my-app --style=scss\n```\n\n{% /tab %}\n\n{% tab label=\"Single File Components application\" %}\n\nCreate an application with Single File Components (inline styles and inline templates):\n\n```bash\nnx g @nx/angular:app apps/my-app --inlineStyle --inlineTemplate\n```\n\n{% /tab %}\n\n{% tab label=\"Set custom prefix and tags\" %}\n\nSet the prefix to apply to generated selectors and add tags to the application (used for linting).\n\n```bash\nnx g @nx/angular:app apps/my-app --prefix=admin --tags=scope:admin,type:ui\n```\n\n{% /tab %}\n{% /tabs %}\n",
|
||||
"presets": []
|
||||
},
|
||||
"aliases": ["app"],
|
||||
|
||||
@@ -12,14 +12,13 @@
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "The path at which to create the component file, relative to the workspace root. By default, it is set to the root of the project.",
|
||||
"description": "The file path to the component. Relative to the current working directory.",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where to create the component?"
|
||||
"x-prompt": "What is the component file path?"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the component.",
|
||||
"x-prompt": "What name would you like to use for the component?"
|
||||
"description": "The component symbol name. Defaults to the last segment of the file path."
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string",
|
||||
@@ -105,6 +104,11 @@
|
||||
"default": false,
|
||||
"x-priority": "important"
|
||||
},
|
||||
"exportDefault": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Use default export for the component instead of a named export."
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
"type": "boolean",
|
||||
@@ -113,7 +117,7 @@
|
||||
}
|
||||
},
|
||||
"required": ["path"],
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Component\" %}\n\nCreate a component named `my-component`:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component\n```\n\n{% /tab %}\n\n{% tab label=\"Single File Component\" %}\n\nCreate a component named `my-component` with inline styles and inline template:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component --inlineStyle --inlineTemplate\n```\n\n{% /tab %}\n\n{% tab label=\"Component with OnPush Change Detection Strategy\" %}\n\nCreate a component named `my-component` with OnPush Change Detection Strategy:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component --changeDetection=OnPush\n```\n\n{% /tab %}\n",
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Component\" %}\n\nGenerate a component named `MyComponent` at `apps/my-app/src/lib/my-component/my-component.component.ts`:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component.ts\n```\n\n{% /tab %}\n\n{% tab label=\"Without Providing the File Extension\" %}\n\nGenerate a component named `MyComponent` at `apps/my-app/src/lib/my-component/my-component.component.ts`:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component\n```\n\n{% /tab %}\n\n{% tab label=\"With Different Symbol Name\" %}\n\nGenerate a component named `CustomComponent` at `apps/my-app/src/lib/my-component/my-component.component.ts`:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component --name=custom\n```\n\n{% /tab %}\n\n{% tab label=\"Single File Component\" %}\n\nCreate a component named `my-component` with inline styles and inline template:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component --inlineStyle --inlineTemplate\n```\n\n{% /tab %}\n\n{% tab label=\"Component with OnPush Change Detection Strategy\" %}\n\nCreate a component named `my-component` with OnPush Change Detection Strategy:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component --changeDetection=OnPush\n```\n\n{% /tab %}\n",
|
||||
"presets": []
|
||||
},
|
||||
"aliases": ["c"],
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"$schema": "http://json-schema.org/schema",
|
||||
"$id": "NxAngularConvertToApplicationExecutorGenerator",
|
||||
"cli": "nx",
|
||||
"title": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder. _Note: this is only supported in Angular versions >= 17.0.0_.",
|
||||
"title": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder.",
|
||||
"description": "Converts a project or all projects using one of the `@angular-devkit/build-angular:browser`, `@angular-devkit/build-angular:browser-esbuild`, `@nx/angular:browser` and `@nx/angular:browser-esbuild` executors to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder. If the converted target is using one of the `@nx/angular` executors, the `@nx/angular:application` executor will be used. Otherwise, the `@angular-devkit/build-angular:application` builder will be used.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -25,7 +25,7 @@
|
||||
"additionalProperties": false,
|
||||
"presets": []
|
||||
},
|
||||
"description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder. _Note: this is only supported in Angular versions >= 17.0.0_.",
|
||||
"description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder.",
|
||||
"implementation": "/packages/angular/src/generators/convert-to-application-executor/convert-to-application-executor.ts",
|
||||
"aliases": [],
|
||||
"hidden": false,
|
||||
|
||||
@@ -9,17 +9,30 @@
|
||||
"type": "object",
|
||||
"description": "Creates a new Angular directive.",
|
||||
"additionalProperties": false,
|
||||
"examples": [
|
||||
{
|
||||
"description": "Generate a directive with the exported symbol matching the file name. It results in the directive `FooDirective` at `mylib/src/lib/foo.directive.ts`",
|
||||
"command": "nx g @nx/angular:directive mylib/src/lib/foo.directive.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate a directive without providing the file extension. It results in the directive `FooDirective` at `mylib/src/lib/foo.directive.ts`",
|
||||
"command": "nx g @nx/angular:directive mylib/src/lib/foo"
|
||||
},
|
||||
{
|
||||
"description": "Generate a directive with the exported symbol different from the file name. It results in the directive `CustomDirective` at `mylib/src/lib/foo.directive.ts`",
|
||||
"command": "nx g @nx/angular:directive mylib/src/lib/foo --name=custom"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "The path at which to create the directive file.",
|
||||
"x-prompt": "Where to put the directive?",
|
||||
"$default": { "$source": "argv", "index": 0 }
|
||||
"description": "The file path to the directive. Relative to the current working directory.",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "What is the directive file path?"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the new directive.",
|
||||
"x-prompt": "What name would you like to use for the directive?"
|
||||
"description": "The directive symbol name. Defaults to the last segment of the file path."
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string",
|
||||
|
||||
@@ -6,11 +6,15 @@
|
||||
"cli": "nx",
|
||||
"$id": "NxReactFederateModule",
|
||||
"title": "Federate Module",
|
||||
"description": "Create a federated module, which is exposed by a remote and can be subsequently loaded by a host.",
|
||||
"description": "Create a federated module, which is exposed by a Producer (remote) and can be subsequently loaded by a Consumer (host).",
|
||||
"examples": [
|
||||
{
|
||||
"command": "nx g federate-module MyModule --path=./src/component/my-cmp.ts --remote=my-remote-app --remoteDirectory=apps/my-remote-app",
|
||||
"command": "nx g federate-module MyModule --path=./src/component/my-cmp.ts --remote=myRemoteApp --remoteDirectory=apps/myRemoteApp",
|
||||
"description": "Create a federated module from my-remote-app, that exposes my-cmp from ./src/component/my-cmp.ts as MyModule."
|
||||
},
|
||||
{
|
||||
"command": "nx g federate-module MyModule --path=./src/component/my-cmp.ts --producer=myProducer --producerDirectory=apps/myProducer",
|
||||
"description": "Create a federated module from myProducer, that exposes my-cmp from ./src/component/my-cmp.ts as MyModule."
|
||||
}
|
||||
],
|
||||
"type": "object",
|
||||
@@ -30,15 +34,17 @@
|
||||
},
|
||||
"remote": {
|
||||
"type": "string",
|
||||
"description": "The name of the remote.",
|
||||
"x-prompt": "What is/should the remote be named?"
|
||||
"description": "The name of the Producer (remote).",
|
||||
"x-prompt": "What is/should the Producer (remote) be named?",
|
||||
"alias": "producer"
|
||||
},
|
||||
"remoteDirectory": {
|
||||
"description": "The directory of the new remote application if one needs to be created.",
|
||||
"type": "string"
|
||||
"description": "The directory of the new Producer (remote) application if one needs to be created.",
|
||||
"type": "string",
|
||||
"alias": "producerDirectory"
|
||||
},
|
||||
"style": {
|
||||
"description": "The file extension to be used for style files for the remote if one needs to be created.",
|
||||
"description": "The file extension to be used for style files for the Producer (remote) if one needs to be created.",
|
||||
"type": "string",
|
||||
"default": "css",
|
||||
"enum": ["css", "scss", "sass", "less"]
|
||||
@@ -52,24 +58,25 @@
|
||||
"unitTestRunner": {
|
||||
"type": "string",
|
||||
"enum": ["jest", "vitest", "none"],
|
||||
"description": "Test runner to use for unit tests of the remote if it needs to be created.",
|
||||
"description": "Test runner to use for unit tests of the Producer (remote) if it needs to be created.",
|
||||
"x-prompt": "Which unit test runner would you like to use?",
|
||||
"default": "jest"
|
||||
},
|
||||
"e2eTestRunner": {
|
||||
"type": "string",
|
||||
"enum": ["cypress", "none"],
|
||||
"description": "Test runner to use for end to end (e2e) tests of the remote if it needs to be created.",
|
||||
"description": "Test runner to use for end to end (e2e) tests of the Producer (remote) if it needs to be created.",
|
||||
"default": "cypress"
|
||||
},
|
||||
"standalone": {
|
||||
"description": "Whether to generate the remote application with standalone components if it needs to be created.",
|
||||
"description": "Whether to generate the Producer (remote) application with standalone components if it needs to be created.",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"host": {
|
||||
"type": "string",
|
||||
"description": "The host / shell application for this remote."
|
||||
"description": "The Consumer (host) application for this Producer (remote).",
|
||||
"alias": "consumer"
|
||||
}
|
||||
},
|
||||
"required": ["name", "path", "remote"],
|
||||
|
||||
@@ -5,13 +5,17 @@
|
||||
"$schema": "https://json-schema.org/schema",
|
||||
"$id": "NxMFHost",
|
||||
"cli": "nx",
|
||||
"title": "Nx Module Federation Host Application",
|
||||
"description": "Create an Angular Host Module Federation Application.",
|
||||
"title": "Nx Module Federation Consumer (Host) Application",
|
||||
"description": "Create an Angular Consumer (Host) Module Federation Application.",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"command": "nx g @nx/angular:host appName --remotes=remote1",
|
||||
"description": "Create an Angular application with configuration in place for Module Federation. If the `remotes` option is provided, attach the remote application to this application's configuration"
|
||||
"description": "Create an Angular application with configuration in place for Module Federation. If the `remotes` option is provided, attach the Producer (remote) application to this application's configuration"
|
||||
},
|
||||
{
|
||||
"command": "nx g @nx/angular:consumer appName --producers=remote1",
|
||||
"description": "Create an Angular application with configuration in place for Module Federation. If the `producers` option is provided, attach the Producer (remote) application to this application's configuration"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
@@ -23,14 +27,15 @@
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name to give to the host Angular application.",
|
||||
"description": "The name to give to the Consumer (host) Angular application.",
|
||||
"pattern": "^[a-zA-Z][^:]*$",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"remotes": {
|
||||
"type": "array",
|
||||
"description": "The names of the remote applications to add to the host.",
|
||||
"x-priority": "important"
|
||||
"description": "The names of the Producers (remote) applications to add to the Consumer (host).",
|
||||
"x-priority": "important",
|
||||
"alias": "producers"
|
||||
},
|
||||
"dynamic": {
|
||||
"type": "boolean",
|
||||
@@ -160,15 +165,19 @@
|
||||
},
|
||||
"standalone": {
|
||||
"type": "boolean",
|
||||
"description": "Whether to generate a host application that uses standalone components.",
|
||||
"description": "Whether to generate a Consumer (host) application that uses standalone components.",
|
||||
"default": true
|
||||
},
|
||||
"ssr": {
|
||||
"description": "Whether to configure SSR for the host application",
|
||||
"description": "Whether to configure SSR for the Consumer (host) application",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"x-priority": "important"
|
||||
},
|
||||
"serverRouting": {
|
||||
"description": "Creates a server application using the Server Routing and App Engine APIs (Developer Preview). _Note: this is only supported in Angular versions >= 19.0.0_.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"typescriptConfiguration": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the module federation configuration and webpack configuration files should use TS.",
|
||||
@@ -181,8 +190,8 @@
|
||||
},
|
||||
"x-type": "application",
|
||||
"description": "Generate a Host Angular Module Federation Application.",
|
||||
"aliases": ["consumer"],
|
||||
"implementation": "/packages/angular/src/generators/host/host.ts",
|
||||
"aliases": [],
|
||||
"hidden": false,
|
||||
"path": "/packages/angular/src/generators/host/schema.json",
|
||||
"type": "generator"
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["directory"],
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Library\" %}\n\nCreates the `my-ui-lib` library with an `ui` tag:\n\n```bash\nnx g @nx/angular:library libs/my-ui-lib --tags=ui\n```\n\n{% /tab %}\n\n{% tab label=\"Publishable Library\" %}\n\nCreates the `my-lib` library that can be built producing an output following the Angular Package Format (APF) to be distributed as an NPM package:\n\n```bash\nnx g @nx/angular:library libs/my-lib --publishable --import-path=@my-org/my-lib\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable Library\" %}\n\nCreates the `my-lib` library with support for incremental builds:\n\n```bash\nnx g @nx/angular:library libs/my-lib --buildable\n```\n\n{% /tab %}\n\n{% tab label=\"Nested Folder & Import\"%}\nCreates the `my-lib` library in the `nested` directory and sets the import path to `@myorg/nested/my-lib`:\n\n{% callout type=\"note\" title=\"Directory Flag Behavior Changes\" %}\nThe command below uses the `as-provided` directory flag behavior, which is the default in Nx 16.8.0. If you're on an earlier version of Nx or using the `derived` option, use `--directory=nested`. See the [as-provided vs. derived documentation](/deprecated/as-provided-vs-derived) for more details.\n{% /callout %}\n\n```bash\nnx g @nx/angular:library libs/nested/my-lib --importPath=@myorg/nested/my-lib\n```\n\n{% /tab %}\n",
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Library\" %}\n\nCreates the `my-ui-lib` library with an `ui` tag:\n\n```bash\nnx g @nx/angular:library libs/my-ui-lib --tags=ui\n```\n\n{% /tab %}\n\n{% tab label=\"Publishable Library\" %}\n\nCreates the `my-lib` library that can be built producing an output following the Angular Package Format (APF) to be distributed as an NPM package:\n\n```bash\nnx g @nx/angular:library libs/my-lib --publishable --import-path=@my-org/my-lib\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable Library\" %}\n\nCreates the `my-lib` library with support for incremental builds:\n\n```bash\nnx g @nx/angular:library libs/my-lib --buildable\n```\n\n{% /tab %}\n\n{% tab label=\"Nested Folder & Import\"%}\nCreates the `my-lib` library in the `nested` directory and sets the import path to `@myorg/nested/my-lib`:\n\n```bash\nnx g @nx/angular:library libs/nested/my-lib --importPath=@myorg/nested/my-lib\n```\n\n{% /tab %}\n",
|
||||
"presets": []
|
||||
},
|
||||
"aliases": ["lib"],
|
||||
|
||||
@@ -9,17 +9,30 @@
|
||||
"cli": "nx",
|
||||
"additionalProperties": false,
|
||||
"description": "Creates an Angular pipe.",
|
||||
"examples": [
|
||||
{
|
||||
"description": "Generate a pipe with the exported symbol matching the file name. It results in the pipe `FooPipe` at `mylib/src/lib/foo.pipe.ts`",
|
||||
"command": "nx g @nx/angular:pipe mylib/src/lib/foo.pipe.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate a pipe without providing the file extension. It results in the pipe `FooPipe` at `mylib/src/lib/foo.pipe.ts`",
|
||||
"command": "nx g @nx/angular:pipe mylib/src/lib/foo"
|
||||
},
|
||||
{
|
||||
"description": "Generate a pipe with the exported symbol different from the file name. It results in the pipe `CustomPipe` at `mylib/src/lib/foo.pipe.ts`",
|
||||
"command": "nx g @nx/angular:pipe mylib/src/lib/foo --name=custom"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "The path at which to create the pipe file, relative to the workspace root.",
|
||||
"description": "The file path to the pipe. Relative to the current working directory.",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "What is the path of the new pipe?"
|
||||
"x-prompt": "What is the pipe file path?"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the pipe.",
|
||||
"x-prompt": "What name would you like to use for the pipe?"
|
||||
"description": "The pipe symbol name. Defaults to the last segment of the file path."
|
||||
},
|
||||
"skipTests": {
|
||||
"type": "boolean",
|
||||
|
||||
@@ -5,13 +5,17 @@
|
||||
"$schema": "https://json-schema.org/schema",
|
||||
"$id": "NxMFRemote",
|
||||
"cli": "nx",
|
||||
"title": "Nx Module Federation Remote App",
|
||||
"description": "Create an Angular Remote Module Federation Application.",
|
||||
"title": "Nx Module Federation Producer (Remote) App",
|
||||
"description": "Create an Angular Producer (Remote) Module Federation Application.",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"command": "nx g @nx/angular:remote appName --host=host --port=4201",
|
||||
"description": "Create an Angular app with configuration in place for Module Federation. If host is provided, attach this remote app to host app's configuration."
|
||||
"description": "Create an Angular app with configuration in place for Module Federation. If Consumer (host) is provided, attach this Producer (remote) app to Consumer (host) app's configuration."
|
||||
},
|
||||
{
|
||||
"command": "nx g @nx/angular:producer appName --consumer=host --port=4201",
|
||||
"description": "Create an Angular app with configuration in place for Module Federation. If Consumer (host) is provided, attach this Producer (remote) app to Consumer (host) app's configuration."
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
@@ -23,15 +27,16 @@
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name to give to the remote Angular app.",
|
||||
"description": "The name to give to the Producer (remote) Angular app.",
|
||||
"pattern": "^[a-zA-Z_$][a-zA-Z_$0-9]*$",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"host": {
|
||||
"type": "string",
|
||||
"description": "The name of the host app to attach this remote app to.",
|
||||
"description": "The name of the Consumer (host) app to attach this Producer (remote) app to.",
|
||||
"x-dropdown": "projects",
|
||||
"x-priority": "important"
|
||||
"x-priority": "important",
|
||||
"alias": "consumer"
|
||||
},
|
||||
"port": {
|
||||
"type": "number",
|
||||
@@ -153,15 +158,19 @@
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"standalone": {
|
||||
"description": "Whether to generate a remote application with standalone components.",
|
||||
"description": "Whether to generate a Producer (remote) application with standalone components.",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"ssr": {
|
||||
"description": "Whether to configure SSR for the remote application to be consumed by a host application using SSR.",
|
||||
"description": "Whether to configure SSR for the Producer (remote) application to be consumed by a Consumer (host) application using SSR.",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"serverRouting": {
|
||||
"description": "Creates a server application using the Server Routing and App Engine APIs (Developer Preview). _Note: this is only supported in Angular versions >= 19.0.0_.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"typescriptConfiguration": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the module federation configuration and webpack configuration files should use TS.",
|
||||
@@ -174,8 +183,8 @@
|
||||
},
|
||||
"x-type": "application",
|
||||
"description": "Generate a Remote Angular Module Federation Application.",
|
||||
"aliases": ["producer"],
|
||||
"implementation": "/packages/angular/src/generators/remote/remote.ts",
|
||||
"aliases": [],
|
||||
"hidden": false,
|
||||
"path": "/packages/angular/src/generators/remote/schema.json",
|
||||
"type": "generator"
|
||||
|
||||
@@ -9,8 +9,16 @@
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"command": "nx g @nx/angular:scam-directive my-sample --directory=my-lib/src/lib/my-sample",
|
||||
"description": "Generate a `MySampleDirective` directive in a `my-sample` folder in the `my-lib` library"
|
||||
"description": "Generate a directive with the exported symbol matching the file name. It results in the directive `FooDirective` at `mylib/src/lib/foo.directive.ts`",
|
||||
"command": "nx g @nx/angular:scam-directive mylib/src/lib/foo.directive.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate a directive without providing the file extension. It results in the directive `FooDirective` at `mylib/src/lib/foo.directive.ts`",
|
||||
"command": "nx g @nx/angular:scam-directive mylib/src/lib/foo"
|
||||
},
|
||||
{
|
||||
"description": "Generate a directive with the exported symbol different from the file name. It results in the directive `CustomDirective` at `mylib/src/lib/foo.directive.ts`",
|
||||
"command": "nx g @nx/angular:scam-directive mylib/src/lib/foo --name=custom"
|
||||
}
|
||||
],
|
||||
"description": "Creates a new, generic Angular directive definition in the given or default project.",
|
||||
@@ -18,33 +26,13 @@
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "The path at which to create the SCAM Directive files, relative to the workspace root.",
|
||||
"description": "The file path to the SCAM directive. Relative to the current working directory.",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "What is the path of the new directive?"
|
||||
"x-prompt": "What is the SCAM directive file path?"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the directive.",
|
||||
"x-prompt": "What name would you like to use for the directive?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"directory": {
|
||||
"type": "string",
|
||||
"description": "The directory at which to create the SCAM Directive files. When `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. Otherwise, it will be relative to the workspace root.",
|
||||
"aliases": ["dir", "path"],
|
||||
"x-priority": "important"
|
||||
},
|
||||
"nameAndDirectoryFormat": {
|
||||
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
|
||||
"type": "string",
|
||||
"enum": ["as-provided", "derived"]
|
||||
},
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The name of the project.",
|
||||
"$default": { "$source": "projectName" },
|
||||
"x-dropdown": "projects",
|
||||
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
|
||||
"description": "The directive symbol name. Defaults to the last segment of the file path."
|
||||
},
|
||||
"skipTests": {
|
||||
"type": "boolean",
|
||||
@@ -57,12 +45,6 @@
|
||||
"default": true,
|
||||
"x-priority": "important"
|
||||
},
|
||||
"flat": {
|
||||
"type": "boolean",
|
||||
"description": "Create the new files at the top level of the current project.",
|
||||
"default": true,
|
||||
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
|
||||
},
|
||||
"selector": {
|
||||
"type": "string",
|
||||
"format": "html-selector",
|
||||
|
||||
@@ -9,8 +9,16 @@
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"command": "nx g @nx/angular:scam-pipe mylib/src/lib/my-transformation/my-transformation",
|
||||
"description": "Generates a `MyTransformationPipe` in a `my-transformation` folder in the `my-lib` project"
|
||||
"description": "Generate a pipe with the exported symbol matching the file name. It results in the pipe `FooPipe` at `mylib/src/lib/foo.pipe.ts`",
|
||||
"command": "nx g @nx/angular:scam-pipe mylib/src/lib/foo.pipe.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate a pipe without providing the file extension. It results in the pipe `FooPipe` at `mylib/src/lib/foo.pipe.ts`",
|
||||
"command": "nx g @nx/angular:scam-pipe mylib/src/lib/foo"
|
||||
},
|
||||
{
|
||||
"description": "Generate a pipe with the exported symbol different from the file name. It results in the pipe `CustomPipe` at `mylib/src/lib/foo.pipe.ts`",
|
||||
"command": "nx g @nx/angular:scam-pipe mylib/src/lib/foo --name=custom"
|
||||
}
|
||||
],
|
||||
"description": "Creates a new, generic Angular pipe definition in the given or default project.",
|
||||
@@ -18,15 +26,13 @@
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "The path at which to create the pipe file, relative to the workspace root.",
|
||||
"description": "The file path to the SCAM pipe. Relative to the current working directory.",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "What is the path of the new pipe?"
|
||||
"x-prompt": "What is the SCAM pipe file path?"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the pipe.",
|
||||
"x-prompt": "What name would you like to use for the pipe?",
|
||||
"x-priority": "important"
|
||||
"description": "The pipe symbol name. Defaults to the last segment of the file path."
|
||||
},
|
||||
"skipTests": {
|
||||
"type": "boolean",
|
||||
@@ -39,12 +45,6 @@
|
||||
"default": true,
|
||||
"x-priority": "important"
|
||||
},
|
||||
"flat": {
|
||||
"type": "boolean",
|
||||
"description": "Create the new files at the top level of the current project.",
|
||||
"default": true,
|
||||
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
|
||||
},
|
||||
"export": {
|
||||
"type": "boolean",
|
||||
"description": "Specifies if the SCAM should be exported from the project's entry point (normally `index.ts`). It only applies to libraries.",
|
||||
|
||||
@@ -9,8 +9,16 @@
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"command": "nx g @nx/angular:scam my-lib/src/lib/my-sample/my-sample",
|
||||
"description": "Generate a `MySampleComponent` component in the `my-lib` library."
|
||||
"description": "Generate a component with the exported symbol matching the file name. It results in the component `FooComponent` at `mylib/src/lib/foo.component.ts`",
|
||||
"command": "nx g @nx/angular:scam mylib/src/lib/foo.component.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate a component without providing the file extension. It results in the component `FooComponent` at `mylib/src/lib/foo.component.ts`",
|
||||
"command": "nx g @nx/angular:scam mylib/src/lib/foo"
|
||||
},
|
||||
{
|
||||
"description": "Generate a component with the exported symbol different from the file name. It results in the component `CustomComponent` at `mylib/src/lib/foo.component.ts`",
|
||||
"command": "nx g @nx/angular:scam mylib/src/lib/foo --name=custom"
|
||||
}
|
||||
],
|
||||
"description": "Creates a new Angular SCAM.",
|
||||
@@ -18,14 +26,13 @@
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "The path at which to create the SCAM file, relative to the workspace root.",
|
||||
"description": "The file path to the SCAM. Relative to the current working directory.",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "What is the path of the new SCAM?"
|
||||
"x-prompt": "What is the SCAM file path?"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the component.",
|
||||
"x-prompt": "What name would you like to use for the component?"
|
||||
"description": "The component symbol name. Defaults to the last segment of the file path."
|
||||
},
|
||||
"displayBlock": {
|
||||
"description": "Specifies if the style will contain `:host { display: block; }`.",
|
||||
|
||||
@@ -34,15 +34,17 @@
|
||||
},
|
||||
"remotes": {
|
||||
"type": "array",
|
||||
"description": "A list of remote application names that the host application should consume."
|
||||
"description": "A list of remote application names that the Consumer (host) application should consume.",
|
||||
"alias": "producers"
|
||||
},
|
||||
"host": {
|
||||
"type": "string",
|
||||
"description": "The name of the host application that the remote application will be consumed by."
|
||||
"description": "The name of the host application that the remote application will be consumed by.",
|
||||
"alias": "consumer"
|
||||
},
|
||||
"routing": {
|
||||
"type": "boolean",
|
||||
"description": "Generate a routing setup to allow a host application to route to the remote application.",
|
||||
"description": "Generate a routing setup to allow a Consumer (host) application to route to the Producer (remote) application.",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"skipFormat": {
|
||||
|
||||
@@ -16,13 +16,6 @@
|
||||
"x-prompt": "What app would you like to generate an Angular Universal configuration for?",
|
||||
"x-dropdown": "projects"
|
||||
},
|
||||
"appId": {
|
||||
"type": "string",
|
||||
"format": "html-selector",
|
||||
"description": "The `appId` to use with `withServerTransition`.",
|
||||
"default": "serverApp",
|
||||
"x-deprecated": "This is deprecated and ignored since Angular 16 and not supported since Angular 17."
|
||||
},
|
||||
"main": {
|
||||
"type": "string",
|
||||
"format": "path",
|
||||
@@ -56,7 +49,12 @@
|
||||
},
|
||||
"hydration": {
|
||||
"type": "boolean",
|
||||
"description": "Set up Hydration for the SSR application. It defaults to `true` for Angular versions >= 17.0.0. Otherwise, it defaults to `false`."
|
||||
"description": "Set up Hydration for the SSR application.",
|
||||
"default": true
|
||||
},
|
||||
"serverRouting": {
|
||||
"description": "Creates a server application using the Server Routing and App Engine APIs (Developer Preview). _Note: this is only supported in Angular versions >= 19.0.0_.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"skipFormat": {
|
||||
"type": "boolean",
|
||||
|
||||
@@ -47,10 +47,6 @@ npm add -D @nx/esbuild
|
||||
|
||||
### Creating a new JS library
|
||||
|
||||
{% callout type="note" title="Directory Flag Behavior Changes" %}
|
||||
The command below uses the `as-provided` directory flag behavior, which is the default in Nx 16.8.0. If you're on an earlier version of Nx or using the `derived` option, omit the `--directory` flag. See the [as-provided vs. derived documentation](/deprecated/as-provided-vs-derived) for more details.
|
||||
{% /callout %}
|
||||
|
||||
You can add a new library that builds using esbuild with:
|
||||
|
||||
```shell
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"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",
|
||||
"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\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\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\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\n{% /tab %}\n{% tabs %}\n",
|
||||
"presets": []
|
||||
},
|
||||
"description": "Bundle a package using EsBuild.",
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
"description": "Create an Expo Application for Nx.",
|
||||
"examples": [
|
||||
{
|
||||
"command": "g @nx/expo:app myapp --directory=nested",
|
||||
"command": "nx g @nx/expo:app myapp --directory=nested",
|
||||
"description": "Generate apps/nested/myapp"
|
||||
},
|
||||
{
|
||||
"command": "g @nx/expo:app myapp --classComponent",
|
||||
"command": "nx g @nx/expo:app myapp --classComponent",
|
||||
"description": "Use class components instead of functional components"
|
||||
}
|
||||
],
|
||||
@@ -44,13 +44,15 @@
|
||||
"description": "The tool to use for running lint checks.",
|
||||
"type": "string",
|
||||
"enum": ["eslint", "none"],
|
||||
"default": "eslint"
|
||||
"default": "none",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"unitTestRunner": {
|
||||
"type": "string",
|
||||
"enum": ["jest", "none"],
|
||||
"description": "Test runner to use for unit tests",
|
||||
"default": "jest"
|
||||
"default": "none",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"tags": {
|
||||
"type": "string",
|
||||
@@ -71,7 +73,8 @@
|
||||
"description": "Adds the specified e2e test runner",
|
||||
"type": "string",
|
||||
"enum": ["playwright", "cypress", "detox", "none"],
|
||||
"default": "none"
|
||||
"default": "none",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"standaloneConfig": {
|
||||
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
|
||||
|
||||
@@ -9,31 +9,37 @@
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"command": "g @nx/expo:component mylib/my-component --name my-component",
|
||||
"description": "Generate a component in the mylib library"
|
||||
"description": "Generate a component with the exported symbol matching the file name. It results in the component `Foo` at `mylib/src/foo.tsx`",
|
||||
"command": "nx g @nx/expo:component mylib/src/foo.tsx"
|
||||
},
|
||||
{
|
||||
"command": "g @nx/expo:component mylib/my-component --name my-component --classComponent",
|
||||
"description": "Generate a class component in the mylib library"
|
||||
"description": "Generate a component with the exported symbol different from the file name. It results in the component `Custom` at `mylib/src/foo.tsx`",
|
||||
"command": "nx g @nx/expo:component mylib/src/foo.tsx --name=custom"
|
||||
},
|
||||
{
|
||||
"description": "Generate a component without the providing the file extension. It results in the component `Foo` at `mylib/src/foo.tsx`",
|
||||
"command": "nx g @nx/expo:component mylib/src/foo"
|
||||
},
|
||||
{
|
||||
"description": "Generate a class component at `mylib/src/foo.tsx`",
|
||||
"command": "nx g @nx/expo:component mylib/src/foo --classComponent"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "Path where the component will be generated.",
|
||||
"description": "The file path to the component. Relative to the current working directory.",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the component be generated?",
|
||||
"x-priority": "important"
|
||||
"x-prompt": "What is the component file path?"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the component.",
|
||||
"x-prompt": "What name would you like to use for the component?"
|
||||
"description": "The component symbol name. Defaults to the last segment of the file path."
|
||||
},
|
||||
"js": {
|
||||
"type": "boolean",
|
||||
"description": "Generate JavaScript files rather than TypeScript files.",
|
||||
"default": false
|
||||
"x-deprecated": "Provide the full file path including the file extension in the `path` option. This option will be removed in Nx v21."
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"command": "g @nx/expo:lib mylib --directory=myapp",
|
||||
"command": "nx g @nx/expo:lib mylib --directory=myapp",
|
||||
"description": "Generate libs/myapp/mylib"
|
||||
}
|
||||
],
|
||||
@@ -29,13 +29,16 @@
|
||||
"description": "The tool to use for running lint checks.",
|
||||
"type": "string",
|
||||
"enum": ["eslint", "none"],
|
||||
"default": "eslint"
|
||||
"default": "none",
|
||||
"x-prompt": "Which linter would you like to use?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"unitTestRunner": {
|
||||
"type": "string",
|
||||
"enum": ["jest", "none"],
|
||||
"description": "Test runner to use for unit tests.",
|
||||
"default": "jest"
|
||||
"default": "none",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"tags": {
|
||||
"type": "string",
|
||||
|
||||
@@ -33,14 +33,17 @@
|
||||
"linter": {
|
||||
"description": "The tool to use for running lint checks.",
|
||||
"type": "string",
|
||||
"enum": ["eslint"],
|
||||
"default": "eslint"
|
||||
"enum": ["eslint", "none"],
|
||||
"default": "none",
|
||||
"x-prompt": "Which linter would you like to use?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"unitTestRunner": {
|
||||
"type": "string",
|
||||
"enum": ["jest", "none"],
|
||||
"description": "Test runner to use for unit tests.",
|
||||
"default": "jest"
|
||||
"default": "none",
|
||||
"x-prompt": "Which unit test runner would you like to use?"
|
||||
},
|
||||
"tags": {
|
||||
"type": "string",
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
}
|
||||
},
|
||||
"required": ["directory"],
|
||||
"examplesFile": "---\ntitle: JS library generator examples\ndescription: This page contains examples for the @nx/js:lib generator.\n---\n\nThe `@nx/js:lib` generator will generate a library for you, and it will configure it according to the options you provide.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib\n```\n\nBy default, the library that is generated when you use this executor without passing any options, like the example above, will be a buildable library, using the `@nx/js:tsc` executor as a builder.\n\nYou may configure the tools you want to use to build your library, or bundle it too, by passing the `--bundler` flag. The `--bundler` flag controls the compiler and/or the bundler that will be used to build your library. If you choose `tsc` or `swc`, the result will be a buildable library using either `tsc` or `swc` as the compiler. If you choose `rollup` or `vite`, the result will be a buildable library using `rollup` or `vite` as the bundler. In the case of `rollup`, it will default to the `tsc` compiler. If you choose `esbuild`, you may use the [`esbuildOptions` property](https://esbuild.github.io/api/) in your `project.json` under the `build` target options to specify whether you wish to bundle your library or not.\n\n## Examples\n\n{% tabs %}\n\n{% tab label=\"Buildable with default compiler (tsc)\" %}\n\nGenerate a buildable library using the `@nx/js:tsc` executor. This uses `tsc` as the compiler.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable with SWC compiler\" %}\n\nGenerate a buildable library using [SWC](https://swc.rs) as the compiler. This will use the `@nx/js:swc` executor.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=swc\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable with tsc\" %}\n\nGenerate a buildable library using tsc as the compiler. This will use the `@nx/js:tsc` executor.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=tsc\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable, with Rollup as a bundler\" %}\n\nGenerate a buildable library using [Rollup](https://rollupjs.org) as the bundler. This will use the `@nx/rollup:rollup` executor. It will also use [SWC](https://swc.rs) as the compiler.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=rollup\n```\n\nIf you do not want to use `swc` as the compiler, and want to use the default `babel` compiler, you can do so in your `project.json` under the `build` target options, using the [`compiler` property](/nx-api/rollup/executors/rollup#compiler):\n\n```jsonc {% fileName=\"libs/mylib/project.json\" %}\n\"build\": {\n \"executor\": \"@nx/rollup:rollup\",\n \"options\": {\n //...\n \"compiler\": \"babel\"\n }\n}\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable, with Vite as a bundler\" %}\n\nGenerate a buildable library using [Vite](https://vitejs.dev/) as the bundler. This will use the `@nx/vite:build` executor.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=vite\n```\n\n{% /tab %}\n\n{% tab label=\"Using ESBuild\" %}\n\nGenerate a buildable library using [ESBuild](https://esbuild.github.io/) as the bundler. This will use the `@nx/esbuild:esbuild` executor.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=esbuild\n```\n\nIf you want to specify whether you want to bundle your library or not, you can do so in your `project.json` under the `build` target options, using the [`esbuildOptions` property](https://esbuild.github.io/api/):\n\n```jsonc {% fileName=\"libs/mylib/project.json\" %}\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n //...\n \"esbuildOptions\": {\n \"bundle\": true\n }\n }\n}\n```\n\n{% /tab %}\n\n{% tab label=\"Minimal publishing target\" %}\n\nGenerate a **publishable** library with a minimal publishing target. The result will be a buildable library using the `@nx/js:tsc` executor, using `tsc` as the compiler. You can change the compiler or the bundler by passing the `--bundler` flag.\n\n```bash\nnpx nx g lib libs/mylib --publishable\n```\n\n{% /tab %}\n\n{% tab label=\"Using directory flag\" %}\n\nGenerate a library named `mylib` and put it under a directory named `myapp` (`libs/myapp/mylib`)\n\n{% callout type=\"note\" title=\"Directory Flag Behavior Changes\" %}\nThe command below uses the `as-provided` directory flag behavior, which is the default in Nx 16.8.0. If you're on an earlier version of Nx or using the `derived` option, use `--directory=myapp`. See the [as-provided vs. derived documentation](/deprecated/as-provided-vs-derived) for more details.\n{% /callout %}\n\n```shell\nnpx nx g lib libs/nested/mylib\n```\n\n{% /tab %}\n\n{% tab label=\"Non-buildable library\" %}\n\nGenerate a non-buildable library.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=none\n```\n\n{% /tab %}\n\n{% /tabs %}\n",
|
||||
"examplesFile": "---\ntitle: JS library generator examples\ndescription: This page contains examples for the @nx/js:lib generator.\n---\n\nThe `@nx/js:lib` generator will generate a library for you, and it will configure it according to the options you provide.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib\n```\n\nBy default, the library that is generated when you use this executor without passing any options, like the example above, will be a buildable library, using the `@nx/js:tsc` executor as a builder.\n\nYou may configure the tools you want to use to build your library, or bundle it too, by passing the `--bundler` flag. The `--bundler` flag controls the compiler and/or the bundler that will be used to build your library. If you choose `tsc` or `swc`, the result will be a buildable library using either `tsc` or `swc` as the compiler. If you choose `rollup` or `vite`, the result will be a buildable library using `rollup` or `vite` as the bundler. In the case of `rollup`, it will default to the `tsc` compiler. If you choose `esbuild`, you may use the [`esbuildOptions` property](https://esbuild.github.io/api/) in your `project.json` under the `build` target options to specify whether you wish to bundle your library or not.\n\n## Examples\n\n{% tabs %}\n\n{% tab label=\"Buildable with default compiler (tsc)\" %}\n\nGenerate a buildable library using the `@nx/js:tsc` executor. This uses `tsc` as the compiler.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable with SWC compiler\" %}\n\nGenerate a buildable library using [SWC](https://swc.rs) as the compiler. This will use the `@nx/js:swc` executor.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=swc\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable with tsc\" %}\n\nGenerate a buildable library using tsc as the compiler. This will use the `@nx/js:tsc` executor.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=tsc\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable, with Rollup as a bundler\" %}\n\nGenerate a buildable library using [Rollup](https://rollupjs.org) as the bundler. This will use the `@nx/rollup:rollup` executor. It will also use [SWC](https://swc.rs) as the compiler.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=rollup\n```\n\nIf you do not want to use `swc` as the compiler, and want to use the default `babel` compiler, you can do so in your `project.json` under the `build` target options, using the [`compiler` property](/nx-api/rollup/executors/rollup#compiler):\n\n```jsonc {% fileName=\"libs/mylib/project.json\" %}\n\"build\": {\n \"executor\": \"@nx/rollup:rollup\",\n \"options\": {\n //...\n \"compiler\": \"babel\"\n }\n}\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable, with Vite as a bundler\" %}\n\nGenerate a buildable library using [Vite](https://vitejs.dev/) as the bundler. This will use the `@nx/vite:build` executor.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=vite\n```\n\n{% /tab %}\n\n{% tab label=\"Using ESBuild\" %}\n\nGenerate a buildable library using [ESBuild](https://esbuild.github.io/) as the bundler. This will use the `@nx/esbuild:esbuild` executor.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=esbuild\n```\n\nIf you want to specify whether you want to bundle your library or not, you can do so in your `project.json` under the `build` target options, using the [`esbuildOptions` property](https://esbuild.github.io/api/):\n\n```jsonc {% fileName=\"libs/mylib/project.json\" %}\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n //...\n \"esbuildOptions\": {\n \"bundle\": true\n }\n }\n}\n```\n\n{% /tab %}\n\n{% tab label=\"Minimal publishing target\" %}\n\nGenerate a **publishable** library with a minimal publishing target. The result will be a buildable library using the `@nx/js:tsc` executor, using `tsc` as the compiler. You can change the compiler or the bundler by passing the `--bundler` flag.\n\n```bash\nnpx nx g lib libs/mylib --publishable\n```\n\n{% /tab %}\n\n{% tab label=\"In a nested directory\" %}\n\nGenerate a library named `mylib` and put it under a directory named `nested` (`libs/nested/mylib`).\n\n```shell\nnpx nx g lib libs/nested/mylib\n```\n\n{% /tab %}\n\n{% tab label=\"Non-buildable library\" %}\n\nGenerate a non-buildable library.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=none\n```\n\n{% /tab %}\n\n{% /tabs %}\n",
|
||||
"presets": []
|
||||
},
|
||||
"aliases": ["lib"],
|
||||
|
||||
@@ -37,13 +37,16 @@
|
||||
"description": "The tool to use for running lint checks.",
|
||||
"type": "string",
|
||||
"enum": ["eslint", "none"],
|
||||
"default": "eslint"
|
||||
"default": "none",
|
||||
"x-prompt": "Which linter would you like to use?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"unitTestRunner": {
|
||||
"description": "Test runner to use for unit tests.",
|
||||
"type": "string",
|
||||
"enum": ["jest", "none"],
|
||||
"default": "jest"
|
||||
"default": "none",
|
||||
"x-prompt": "Which unit test runner would you like to use?"
|
||||
},
|
||||
"e2eTestRunner": {
|
||||
"type": "string",
|
||||
|
||||
@@ -8,17 +8,22 @@
|
||||
"description": "Nest Class Options Schema.",
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"description": "Generate the class `Foo` at `myapp/src/app/foo.ts`",
|
||||
"command": "nx g @nx/nest:class myapp/src/app/foo.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate the class without providing the file extension. It results in the class `Foo` at `myapp/src/app/foo.ts`",
|
||||
"command": "nx g @nx/nest:class myapp/src/app/foo"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "Path where the class will be generated.",
|
||||
"description": "The file path to the class. Relative to the current working directory.",
|
||||
"type": "string",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the class be generated?"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the class.",
|
||||
"type": "string",
|
||||
"x-prompt": "What name would you like to use?"
|
||||
"x-prompt": "What is the class file path?"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
@@ -32,12 +37,6 @@
|
||||
"enum": ["jest", "none"],
|
||||
"default": "jest"
|
||||
},
|
||||
"flat": {
|
||||
"description": "Flag to indicate if a directory is created.",
|
||||
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"language": {
|
||||
"description": "Nest class language.",
|
||||
"type": "string",
|
||||
|
||||
@@ -8,17 +8,22 @@
|
||||
"description": "Nest Controller Options Schema.",
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"description": "Generate the controller `FooController` at `myapp/src/app/foo.controller.ts`",
|
||||
"command": "nx g @nx/nest:controller myapp/src/app/foo.controller.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate the controller without providing the file extension. It results in the controller `FooController` at `myapp/src/app/foo.controller.ts`",
|
||||
"command": "nx g @nx/nest:controller myapp/src/app/foo"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "Path where the controller will be generated.",
|
||||
"description": "The file path to the controller. Relative to the current working directory.",
|
||||
"type": "string",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the controller be generated?"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the controller.",
|
||||
"type": "string",
|
||||
"x-prompt": "What name would you like to use?"
|
||||
"x-prompt": "What is the controller file path?"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
|
||||
@@ -8,17 +8,22 @@
|
||||
"description": "Nest Decorator Options Schema.",
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"description": "Generate the decorator `Foo` at `myapp/src/app/foo.decorator.ts`",
|
||||
"command": "nx g @nx/nest:decorator myapp/src/app/foo.decorator.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate the decorator without providing the file extension. It results in the decorator `Foo` at `myapp/src/app/foo.decorator.ts`",
|
||||
"command": "nx g @nx/nest:decorator myapp/src/app/foo"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "Path where the decorator will be generated.",
|
||||
"description": "The file path to the decorator. Relative to the current working directory.",
|
||||
"type": "string",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the decorator be generated?"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the decorator.",
|
||||
"type": "string",
|
||||
"x-prompt": "What name would you like to use?"
|
||||
"x-prompt": "What is the decorator file path?"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
|
||||
@@ -8,17 +8,22 @@
|
||||
"description": "Nest Filter Options Schema.",
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"description": "Generate the filter `FooFilter` at `myapp/src/app/foo.filter.ts`",
|
||||
"command": "nx g @nx/nest:filter myapp/src/app/foo.filter.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate the filter without providing the file extension. It results in the filter `FooFilter` at `myapp/src/app/foo.filter.ts`",
|
||||
"command": "nx g @nx/nest:filter myapp/src/app/foo"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "Path where the filter will be generated.",
|
||||
"description": "The file path to the filter. Relative to the current working directory.",
|
||||
"type": "string",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the filter be generated?"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the filter.",
|
||||
"type": "string",
|
||||
"x-prompt": "What name would you like to use?"
|
||||
"x-prompt": "What is the filter file path?"
|
||||
},
|
||||
"skipFormat": {
|
||||
"type": "boolean",
|
||||
|
||||
@@ -8,17 +8,22 @@
|
||||
"description": "Nest Gateway Options Schema.",
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"description": "Generate the gateway `FooGateway` at `myapp/src/app/foo.gateway.ts`",
|
||||
"command": "nx g @nx/nest:gateway myapp/src/app/foo.gateway.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate the gateway without providing the file extension. It results in the gateway `FooGateway` at `myapp/src/app/foo.gateway.ts`",
|
||||
"command": "nx g @nx/nest:gateway myapp/src/app/foo"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "Path where the gateway will be generated.",
|
||||
"description": "The file path to the gateway. Relative to the current working directory.",
|
||||
"type": "string",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the gateway be generated?"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the gateway.",
|
||||
"type": "string",
|
||||
"x-prompt": "What name would you like to use?"
|
||||
"x-prompt": "What is the gateway file path?"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
|
||||
@@ -8,17 +8,22 @@
|
||||
"description": "Nest Guard Options Schema.",
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"description": "Generate the guard `FooGuard` at `myapp/src/app/foo.guard.ts`",
|
||||
"command": "nx g @nx/nest:guard myapp/src/app/foo.guard.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate the guard without providing the file extension. It results in the guard `FooGuard` at `myapp/src/app/foo.guard.ts`",
|
||||
"command": "nx g @nx/nest:guard myapp/src/app/foo"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "Path where the guard will be generated.",
|
||||
"description": "The file path to the guard. Relative to the current working directory.",
|
||||
"type": "string",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the guard be generated?"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the guard.",
|
||||
"type": "string",
|
||||
"x-prompt": "What name would you like to use?"
|
||||
"x-prompt": "What is the guard file path?"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
@@ -39,7 +44,7 @@
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["name"],
|
||||
"required": ["path"],
|
||||
"presets": []
|
||||
},
|
||||
"description": "Run the `guard` NestJS generator with Nx project support.",
|
||||
|
||||
@@ -8,17 +8,22 @@
|
||||
"description": "Nest Interceptor Options Schema.",
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"description": "Generate the interceptor `FooInterceptor` at `myapp/src/app/foo.interceptor.ts`",
|
||||
"command": "nx g @nx/nest:interceptor myapp/src/app/foo.interceptor.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate the interceptor without providing the file extension. It results in the interceptor `FooInterceptor` at `myapp/src/app/foo.interceptor.ts`",
|
||||
"command": "nx g @nx/nest:interceptor myapp/src/app/foo"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "Path where the interceptor will be generated.",
|
||||
"description": "The file path to the interceptor. Relative to the current working directory.",
|
||||
"type": "string",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the interceptor be generated?"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the interceptor.",
|
||||
"type": "string",
|
||||
"x-prompt": "What name would you like to use?"
|
||||
"x-prompt": "What is the interceptor file path?"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
@@ -39,7 +44,7 @@
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["name"],
|
||||
"required": ["path"],
|
||||
"presets": []
|
||||
},
|
||||
"description": "Run the `interceptor` NestJS generator with Nx project support.",
|
||||
|
||||
@@ -8,29 +8,28 @@
|
||||
"description": "Nest Interface Options Schema.",
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"description": "Generate the interface `Foo` at `myapp/src/app/foo.interface.ts`",
|
||||
"command": "nx g @nx/nest:interface myapp/src/app/foo.interface.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate the interface without providing the file extension. It results in the interface `Foo` at `myapp/src/app/foo.interface.ts`",
|
||||
"command": "nx g @nx/nest:interface myapp/src/app/foo"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "Path where the interface will be generated.",
|
||||
"description": "The file path to the interface. Relative to the current working directory.",
|
||||
"type": "string",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the interface be generated?"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the interface.",
|
||||
"type": "string",
|
||||
"x-prompt": "What name would you like to use?"
|
||||
"x-prompt": "What is the interface file path?"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"flat": {
|
||||
"description": "Flag to indicate if a directory is created.",
|
||||
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
||||
@@ -31,13 +31,17 @@
|
||||
"description": "The tool to use for running lint checks.",
|
||||
"type": "string",
|
||||
"enum": ["eslint", "none"],
|
||||
"default": "eslint"
|
||||
"default": "none",
|
||||
"x-prompt": "Which linter would you like to use?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"unitTestRunner": {
|
||||
"description": "Test runner to use for unit tests.",
|
||||
"type": "string",
|
||||
"enum": ["jest", "none"],
|
||||
"default": "jest"
|
||||
"default": "none",
|
||||
"x-prompt": "Which unit test runner would you like to use?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"tags": {
|
||||
"description": "Add tags to the library (used for linting).",
|
||||
|
||||
@@ -8,17 +8,22 @@
|
||||
"description": "Nest Middleware Options Schema.",
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"description": "Generate the middleware `FooMiddleware` at `myapp/src/app/foo.middleware.ts`",
|
||||
"command": "nx g @nx/nest:middleware myapp/src/app/foo.middleware.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate the middleware without providing the file extension. It results in the middleware `FooMiddleware` at `myapp/src/app/foo.middleware.ts`",
|
||||
"command": "nx g @nx/nest:middleware myapp/src/app/foo"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "Path where the middleware will be generated.",
|
||||
"description": "The file path to the middleware. Relative to the current working directory.",
|
||||
"type": "string",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the middleware be generated?"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the middleware.",
|
||||
"type": "string",
|
||||
"x-prompt": "What name would you like to use?"
|
||||
"x-prompt": "What is the middleware file path?"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
|
||||
@@ -8,17 +8,22 @@
|
||||
"description": "Nest Module Options Schema.",
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"description": "Generate the module `FooModule` at `myapp/src/app/foo.module.ts`",
|
||||
"command": "nx g @nx/nest:module myapp/src/app/foo.module.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate the module without providing the file extension. It results in the module `FooModule` at `myapp/src/app/foo.module.ts`",
|
||||
"command": "nx g @nx/nest:module myapp/src/app/foo"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "Path where the module will be generated.",
|
||||
"description": "The file path to the module. Relative to the current working directory.",
|
||||
"type": "string",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the module be generated?"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the module.",
|
||||
"type": "string",
|
||||
"x-prompt": "What name would you like to use?"
|
||||
"x-prompt": "What is the module file path?"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
|
||||
@@ -8,17 +8,22 @@
|
||||
"description": "Nest Pipe Options Schema.",
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"description": "Generate the pipe `FooPipe` at `myapp/src/app/foo.pipe.ts`",
|
||||
"command": "nx g @nx/nest:pipe myapp/src/app/foo.pipe.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate the pipe without providing the file extension. It results in the pipe `FooPipe` at `myapp/src/app/foo.pipe.ts`",
|
||||
"command": "nx g @nx/nest:pipe myapp/src/app/foo"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "Path where the pipe will be generated.",
|
||||
"description": "The file path to the pipe. Relative to the current working directory.",
|
||||
"type": "string",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the pipe be generated?"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the pipe.",
|
||||
"type": "string",
|
||||
"x-prompt": "What name would you like to use?"
|
||||
"x-prompt": "What is the pipe file path?"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
|
||||
@@ -8,17 +8,22 @@
|
||||
"description": "Nest Provider Options Schema.",
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"description": "Generate the provider `Foo` at `myapp/src/app/foo.ts`",
|
||||
"command": "nx g @nx/nest:provider myapp/src/app/foo.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate the provider without providing the file extension. It results in the provider `Foo` at `myapp/src/app/foo.ts`",
|
||||
"command": "nx g @nx/nest:provider myapp/src/app/foo"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "Path where the provider will be generated.",
|
||||
"description": "The file path to the provider. Relative to the current working directory.",
|
||||
"type": "string",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the provider be generated?"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the provider.",
|
||||
"type": "string",
|
||||
"x-prompt": "What name would you like to use?"
|
||||
"x-prompt": "What is the provider file path?"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
|
||||
@@ -8,17 +8,22 @@
|
||||
"description": "Nest Resolver Options Schema.",
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"description": "Generate the resolver `FooResolver` at `myapp/src/app/foo.resolver.ts`",
|
||||
"command": "nx g @nx/nest:resolver myapp/src/app/foo.resolver.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate the resolver without providing the file extension. It results in the resolver `FooResolver` at `myapp/src/app/foo.resolver.ts`",
|
||||
"command": "nx g @nx/nest:resolver myapp/src/app/foo"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "Path where the resolver will be generated.",
|
||||
"description": "The file path to the resolver. Relative to the current working directory.",
|
||||
"type": "string",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the resolver be generated?"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the resolver.",
|
||||
"type": "string",
|
||||
"x-prompt": "What name would you like to use?"
|
||||
"x-prompt": "What is the resolver file path?"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
|
||||
@@ -8,17 +8,18 @@
|
||||
"description": "Nest Resource Options Schema.",
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"description": "Generate `myapp/src/app/entities/foo.entity.ts`, `myapp/src/app/dto/create-foo.dto.ts`, `myapp/src/app/dto/update-foo.dto.ts`, `myapp/src/app/foo.service.ts`, `myapp/src/app/foo.controller.ts`, and `myapp/src/app/foo.module.ts`",
|
||||
"command": "nx g @nx/nest:resource myapp/src/app/foo"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "Path where the resource will be generated.",
|
||||
"description": "The file path to the resource. Relative to the current working directory.",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the resource be generated?"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the resource.",
|
||||
"x-prompt": "What name would you like to use for this resource (plural, e.g., `users`)?"
|
||||
"x-prompt": "What is the resource file path?"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
@@ -32,11 +33,6 @@
|
||||
"enum": ["jest", "none"],
|
||||
"default": "jest"
|
||||
},
|
||||
"language": {
|
||||
"description": "Nest class language.",
|
||||
"type": "string",
|
||||
"enum": ["js", "ts"]
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "The transport layer.",
|
||||
|
||||
@@ -8,17 +8,22 @@
|
||||
"description": "Nest Service Options Schema.",
|
||||
"cli": "nx",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"description": "Generate the service `FooService` at `myapp/src/app/foo.service.ts`",
|
||||
"command": "nx g @nx/nest:service myapp/src/app/foo.service.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate the service without providing the file extension. It results in the service `FooService` at `myapp/src/app/foo.service.ts`",
|
||||
"command": "nx g @nx/nest:service myapp/src/app/foo"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "Path where the service will be generated.",
|
||||
"description": "The file path to the service. Relative to the current working directory.",
|
||||
"type": "string",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the service be generated?"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the service.",
|
||||
"type": "string",
|
||||
"x-prompt": "What name would you like to use?"
|
||||
"x-prompt": "What is the service file path?"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
}
|
||||
},
|
||||
"required": ["buildTarget"],
|
||||
"examplesFile": "---\ntitle: Next.js server executor examples\ndescription: This page contains examples for the @nx/next:serve executor.\n---\n\n`project.json`:\n\n```json\n//...\n{\n \"name\": \"acme\",\n \"$schema\": \"node_modules/nx/schemas/project-schema.json\",\n \"sourceRoot\": \".\",\n \"projectType\": \"application\",\n \"targets\": {\n //...\n \"serve\": {\n \"executor\": \"@nx/next:server\",\n \"defaultConfiguration\": \"production\",\n \"options\": {\n \"buildTarget\": \"acme:build\",\n \"dev\": true\n }\n }\n //...\n }\n}\n```\n\n```bash\nnx run acme:serve\n```\n\n## Examples\n\n### For Next.js Standalone projects\n\n{% tabs %}\n{% tab label=\"Default configuration\" %}\n\nThis is the default configuration for Next.js standalone projects. Our `@nx/next:server` executor is integrated to use Next.js' CLI. You can read more about the serve options at [Next.js CLI Options](https://nextjs.org/docs/app/api-reference/next-cli)\n\n```json\n \"serve\": {\n \"executor\": \"@nx/next:server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"acme:build\",\n \"dev\": true\n },\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"acme:build:development\",\n \"dev\": true\n },\n \"production\": {\n \"buildTarget\": \"acme:build:production\",\n \"dev\": false\n }\n }\n },\n```\n\n{% /tab %}\n{% tab label=\"Enable turbo\" %}\n\nTurbopack (beta) is a cutting-edge bundler designed for JavaScript and TypeScript. To read more about support features see [Next.js Turbopack Doucmentation](https://turbo.build/pack/docs/features)\n\nIn the context of Nx, you can utilize Turbopack within both the `pages` and `app` directories of Next.js to enhance local development speed. To activate Turbopack, simply:\n\nAppend the `--turbo` flag while executing the Nx development server.\n\n```shell\nnx run acme:serve --turbo\n```\n\nUpdating the build options to include `turbo`.\n\n```json\n \"serve\": {\n \"executor\": \"@nx/next:server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"acme:build\",\n \"dev\": true\n },\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"acme:build:development\",\n \"dev\": true,\n \"turbo\": true\n },\n //\n }\n }\n```\n\n```bash\nnx run acme:serve\n```\n\n{% /tab %}\n\n{% tab label=\"Adding keep alive timeout\" %}\n\nWhen using Nx with Next.js behind a downstream proxy, it's important to make sure that the `keep-alive timeouts` of Next.js' HTTP server are set to longer durations than the timeouts of the proxy. If you don't do this, Node.js will unexpectedly end TCP connections without notifying the proxy when the `keep-alive timeout` is reached. This can lead to a proxy error when the proxy tries to reuse a connection that Node.js has already terminated.\n\nTo configure timeout values (in milliseconds) you can:\n\nPass `--keepAliveTimeout`\n\n```shell\nnx run acme:serve --keepAliveTimeout 60000\n```\n\nUpdating the serve options to include `keepAliveTimeout`.\n\n```json\n \"serve\": {\n \"executor\": \"@nx/next:server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"acme:build\",\n \"dev\": true\n },\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"acme:build:development\",\n \"dev\": true,\n \"keepAliveTimeout\": 60000\n },\n //\n }\n }\n```\n\n```shell\nnx run acme:serve\n```\n\n{% /tab %}\n\n{% /tabs %}\n",
|
||||
"examplesFile": "---\ntitle: Next.js server executor examples\ndescription: This page contains examples for the @nx/next:serve executor.\n---\n\n`project.json`:\n\n```json\n//...\n{\n \"name\": \"acme\",\n \"$schema\": \"node_modules/nx/schemas/project-schema.json\",\n \"sourceRoot\": \".\",\n \"projectType\": \"application\",\n \"targets\": {\n //...\n \"serve\": {\n \"executor\": \"@nx/next:server\",\n \"defaultConfiguration\": \"production\",\n \"options\": {\n \"buildTarget\": \"acme:build\",\n \"dev\": true\n }\n }\n //...\n }\n}\n```\n\n```bash\nnx run acme:serve\n```\n\n## Examples\n\n### For Next.js Standalone projects\n\n{% tabs %}\n{% tab label=\"Default configuration\" %}\n\nThis is the default configuration for Next.js standalone projects. Our `@nx/next:server` executor is integrated to use Next.js' CLI. You can read more about the serve options at [Next.js CLI Options](https://nextjs.org/docs/app/api-reference/next-cli)\n\n```json\n \"serve\": {\n \"executor\": \"@nx/next:server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"acme:build\",\n \"dev\": true\n },\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"acme:build:development\",\n \"dev\": true\n },\n \"production\": {\n \"buildTarget\": \"acme:build:production\",\n \"dev\": false\n }\n }\n },\n```\n\n{% /tab %}\n{% tab label=\"Enable turbo\" %}\n\nTurbopack (beta) is a cutting-edge bundler designed for JavaScript and TypeScript. To read more about support features see [Next.js Turbopack Documentation](https://turbo.build/pack/docs/features)\n\nIn the context of Nx, you can utilize Turbopack within both the `pages` and `app` directories of Next.js to enhance local development speed. To activate Turbopack, simply:\n\nAppend the `--turbo` flag while executing the Nx development server.\n\n```shell\nnx run acme:serve --turbo\n```\n\nUpdating the build options to include `turbo`.\n\n```json\n \"serve\": {\n \"executor\": \"@nx/next:server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"acme:build\",\n \"dev\": true\n },\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"acme:build:development\",\n \"dev\": true,\n \"turbo\": true\n },\n //\n }\n }\n```\n\n```bash\nnx run acme:serve\n```\n\n{% /tab %}\n\n{% tab label=\"Adding keep alive timeout\" %}\n\nWhen using Nx with Next.js behind a downstream proxy, it's important to make sure that the `keep-alive timeouts` of Next.js' HTTP server are set to longer durations than the timeouts of the proxy. If you don't do this, Node.js will unexpectedly end TCP connections without notifying the proxy when the `keep-alive timeout` is reached. This can lead to a proxy error when the proxy tries to reuse a connection that Node.js has already terminated.\n\nTo configure timeout values (in milliseconds) you can:\n\nPass `--keepAliveTimeout`\n\n```shell\nnx run acme:serve --keepAliveTimeout 60000\n```\n\nUpdating the serve options to include `keepAliveTimeout`.\n\n```json\n \"serve\": {\n \"executor\": \"@nx/next:server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"acme:build\",\n \"dev\": true\n },\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"acme:build:development\",\n \"dev\": true,\n \"keepAliveTimeout\": 60000\n },\n //\n }\n }\n```\n\n```shell\nnx run acme:serve\n```\n\n{% /tab %}\n\n{% /tabs %}\n",
|
||||
"presets": []
|
||||
},
|
||||
"description": "Serve a Next.js application.",
|
||||
|
||||
@@ -63,8 +63,10 @@
|
||||
"linter": {
|
||||
"description": "The tool to use for running lint checks.",
|
||||
"type": "string",
|
||||
"enum": ["eslint"],
|
||||
"default": "eslint"
|
||||
"enum": ["eslint", "none"],
|
||||
"default": "none",
|
||||
"x-prompt": "Which linter would you like to use?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
@@ -76,7 +78,9 @@
|
||||
"type": "string",
|
||||
"enum": ["jest", "none"],
|
||||
"description": "Test runner to use for unit tests.",
|
||||
"default": "jest"
|
||||
"default": "none",
|
||||
"x-prompt": "What unit test runner should be used?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"e2eTestRunner": {
|
||||
"type": "string",
|
||||
@@ -137,7 +141,7 @@
|
||||
}
|
||||
},
|
||||
"required": ["directory"],
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create app in a directory\" %}\n\n{% callout type=\"note\" title=\"Directory Flag Behavior Changes\" %}\nThe command below uses the `as-provided` directory flag behavior, which is the default in Nx 16.8.0. If you're on an earlier version of Nx or using the `derived` option, use `--directory=nested`. See the [as-provided vs. derived documentation](/deprecated/as-provided-vs-derived) for more details.\n{% /callout %}\n\n```shell\nnx g app apps/nested/myapp\n```\n\n{% /tab %}\n{% tab label=\"Use a custom Express server\" %}\n\n```shell\nnx g app apps/myapp --custom-server\n```\n\n{% /tab %}\n{% tab label=\"Use plain JavaScript (not TypeScript)\" %}\n\n```shell\nnx g app apps/myapp --js\n```\n\n{% /tab %}\n{% /tabs %}\n",
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create app in a nested directory\" %}\n\n```shell\nnx g app apps/nested/myapp\n```\n\n{% /tab %}\n{% tab label=\"Use a custom Express server\" %}\n\n```shell\nnx g app apps/myapp --custom-server\n```\n\n{% /tab %}\n{% tab label=\"Use plain JavaScript (not TypeScript)\" %}\n\n```shell\nnx g app apps/myapp --js\n```\n\n{% /tab %}\n{% /tabs %}\n",
|
||||
"presets": []
|
||||
},
|
||||
"aliases": ["app"],
|
||||
|
||||
@@ -11,16 +11,14 @@
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "Path where the component will be generated.",
|
||||
"description": "The file path to the component. Relative to the current working directory.",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the component be generated?",
|
||||
"x-prompt": "What is the component file path?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the component.",
|
||||
"x-prompt": "What name would you like to use for the component?",
|
||||
"x-priority": "important"
|
||||
"description": "The component symbol name. Defaults to the last segment of the file path."
|
||||
},
|
||||
"style": {
|
||||
"description": "The file extension to be used for style files.",
|
||||
@@ -40,6 +38,10 @@
|
||||
"value": "less",
|
||||
"label": "LESS [ https://lesscss.org ]"
|
||||
},
|
||||
{
|
||||
"value": "tailwind",
|
||||
"label": "tailwind [ https://tailwindcss.com/ ]"
|
||||
},
|
||||
{
|
||||
"value": "styled-components",
|
||||
"label": "styled-components [ https://styled-components.com ]"
|
||||
@@ -71,7 +73,7 @@
|
||||
"js": {
|
||||
"type": "boolean",
|
||||
"description": "Generate JavaScript files rather than TypeScript files.",
|
||||
"default": false
|
||||
"x-deprecated": "Provide the full file path including the file extension in the `path` option. This option will be removed in Nx v21."
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
@@ -81,7 +83,7 @@
|
||||
}
|
||||
},
|
||||
"required": ["path"],
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create an app component\" %}\n\n```shell\nnx g component apps/my-app/src/lib/my-cmp/my-cmp\n```\n\n{% /tab %}\n{% tab label=\"Create a component without its own folder\" %}\n\nRunning the following will create a component under `apps/my-app/components/my-cmp.tsx` rather than `apps/my-app/components/my-cmp/my-cmp.tsx`.\n\n```shell\nnx g component apps/my-app/src/lib/my-cmp\n```\n\n{% /tab %}\n{% tab label=\"Create component in a custom directory\" %}\n\nRunning the following will create a component under `apps/my-app/foo/my-cmp.tsx` rather than `apps/my-app/my-cmp/my-cmp.tsx`.\n\n```shell\nnx g component apps/my-app/foo/my-cmp\n```\n\n{% /tab %}\n{% /tabs %}\n",
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create a Component\" %}\n\nGenerate a component named `MyComponent` at `apps/my-app/src/app/my-component/my-component.tsx`:\n\n```shell\nnx g component apps/my-app/src/app/my-component/my-component.tsx\n```\n\n{% /tab %}\n{% tab label=\"Create a Component with a Different Symbol Name\" %}\n\nGenerate a component named `Custom` at `apps/my-app/src/app/my-component/my-component.tsx`:\n\n```shell\nnx g component apps/my-app/src/app/my-component/my-component.tsx --name=custom\n```\n\n{% /tab %}\n{% tab label=\"Create a Component Omitting the File Extension\" %}\n\nGenerate a component named `MyComponent` at `apps/my-app/src/app/my-component/my-component.tsx` without specifying the file extension:\n\n```shell\nnx g component apps/my-app/src/app/my-component/my-component\n```\n\n{% /tab %}\n{% /tabs %}\n",
|
||||
"presets": []
|
||||
},
|
||||
"description": "Create a component.",
|
||||
|
||||
@@ -40,6 +40,10 @@
|
||||
"value": "less",
|
||||
"label": "LESS [ https://lesscss.org ]"
|
||||
},
|
||||
{
|
||||
"value": "tailwind",
|
||||
"label": "tailwind [ https://tailwindcss.com/ ]"
|
||||
},
|
||||
{
|
||||
"value": "styled-components",
|
||||
"label": "styled-components [ https://styled-components.com ]"
|
||||
@@ -56,17 +60,29 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"bundler": {
|
||||
"type": "string",
|
||||
"description": "The bundler to use. Choosing 'none' means this library is not buildable.",
|
||||
"enum": ["none", "vite", "rollup"],
|
||||
"default": "none",
|
||||
"x-prompt": "Which bundler would you like to use to build the library? Choose 'none' to skip build setup.",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"linter": {
|
||||
"description": "The tool to use for running lint checks.",
|
||||
"type": "string",
|
||||
"enum": ["eslint"],
|
||||
"default": "eslint"
|
||||
"enum": ["eslint", "none"],
|
||||
"default": "none",
|
||||
"x-prompt": "Which linter would you like to use?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"unitTestRunner": {
|
||||
"type": "string",
|
||||
"enum": ["vitest", "jest", "none"],
|
||||
"description": "Test runner to use for unit tests.",
|
||||
"default": "vitest"
|
||||
"default": "none",
|
||||
"x-prompt": "What unit test runner should be used?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"tags": {
|
||||
"type": "string",
|
||||
@@ -99,7 +115,8 @@
|
||||
"buildable": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Generate a buildable library."
|
||||
"description": "Generate a buildable library that uses rollup to bundle.",
|
||||
"x-deprecated": "Use the `bundler` option for greater control (none, vite, rollup)."
|
||||
},
|
||||
"importPath": {
|
||||
"type": "string",
|
||||
|
||||
@@ -11,16 +11,14 @@
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "Path where the page will be generated.",
|
||||
"description": "The path to the directory where the page will be generated. Relative to the current working directory.",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the page be generated?",
|
||||
"x-prompt": "Which directory do you want to create the page in?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the page.",
|
||||
"x-prompt": "What name would you like to use for the page?",
|
||||
"x-priority": "important"
|
||||
"description": "The page symbol name. Defaults to the page directory name."
|
||||
},
|
||||
"style": {
|
||||
"description": "The file extension to be used for style files.",
|
||||
@@ -73,12 +71,6 @@
|
||||
"description": "Generate JavaScript files rather than TypeScript files.",
|
||||
"default": false
|
||||
},
|
||||
"flat": {
|
||||
"type": "boolean",
|
||||
"description": "Create component at the source root rather than its own directory.",
|
||||
"default": false,
|
||||
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
"type": "boolean",
|
||||
@@ -87,7 +79,7 @@
|
||||
}
|
||||
},
|
||||
"required": ["path"],
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create static page in an app\" %}\n\n```shell\nnx g page apps/my-app/pages/my-page\n```\n\n{% /tab %}\n{% tab label=\"Create dynamic page in an app\" %}\n\nThe following creates a page under `apps/my-app/pages/products/[id].tsx`.\n\n```shell\nnx g page \"apps/my-app/pages/products/[id]\"\n```\n\n{% /tab %}\n\n{% /tabs %}\n",
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create a Static Page\" %}\n\nGenerate a static page named `MyPage` at `apps/my-app/pages/my-page/page.tsx`:\n\n```shell\nnx g page apps/my-app/pages/my-page\n```\n\n{% /tab %}\n{% tab label=\"Create a Dynamic Page\" %}\n\nGenerate a dynamic page at `apps/my-app/pages/products/[id]/page.tsx`:\n\n```shell\nnx g page \"apps/my-app/pages/products/[id]\"\n```\n\n{% /tab %}\n\n{% /tabs %}\n",
|
||||
"presets": []
|
||||
},
|
||||
"description": "Create a page.",
|
||||
|
||||
@@ -36,14 +36,26 @@
|
||||
"linter": {
|
||||
"description": "The tool to use for running lint checks.",
|
||||
"type": "string",
|
||||
"enum": ["eslint"],
|
||||
"default": "eslint"
|
||||
"enum": ["eslint", "none"],
|
||||
"default": "none",
|
||||
"x-prompt": "Which linter would you like to use?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"unitTestRunner": {
|
||||
"type": "string",
|
||||
"enum": ["jest", "none"],
|
||||
"description": "Test runner to use for unit tests.",
|
||||
"default": "jest"
|
||||
"default": "none",
|
||||
"x-priority": "important",
|
||||
"x-prompt": "Which unit test runner would you like to use?"
|
||||
},
|
||||
"e2eTestRunner": {
|
||||
"type": "string",
|
||||
"enum": ["jest", "none"],
|
||||
"description": "Test runner to use for end-to-end tests",
|
||||
"default": "none",
|
||||
"x-priority": "important",
|
||||
"x-prompt": "Which end-to-end test runner would you like to use?"
|
||||
},
|
||||
"tags": {
|
||||
"type": "string",
|
||||
@@ -109,12 +121,6 @@
|
||||
"hidden": true,
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"e2eTestRunner": {
|
||||
"type": "string",
|
||||
"enum": ["jest", "none"],
|
||||
"description": "Test runner to use for end to end (e2e) tests",
|
||||
"default": "jest"
|
||||
},
|
||||
"docker": {
|
||||
"type": "boolean",
|
||||
"description": "Add a docker build target"
|
||||
|
||||
@@ -36,14 +36,18 @@
|
||||
"linter": {
|
||||
"description": "The tool to use for running lint checks.",
|
||||
"type": "string",
|
||||
"enum": ["eslint"],
|
||||
"default": "eslint"
|
||||
"enum": ["eslint", "none"],
|
||||
"default": "none",
|
||||
"x-prompt": "Which linter would you like to use?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"unitTestRunner": {
|
||||
"type": "string",
|
||||
"enum": ["jest", "none"],
|
||||
"description": "Test runner to use for unit tests.",
|
||||
"default": "jest"
|
||||
"default": "none",
|
||||
"x-prompt": "Which unit test runner would you like to use?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"tags": {
|
||||
"type": "string",
|
||||
@@ -69,7 +73,7 @@
|
||||
},
|
||||
"buildable": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"default": true,
|
||||
"description": "Generate a buildable library.",
|
||||
"x-priority": "important"
|
||||
},
|
||||
|
||||
@@ -22,24 +22,27 @@
|
||||
"pattern": "^[a-zA-Z][^:]*$",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"linter": {
|
||||
"description": "The tool to use for running lint checks.",
|
||||
"type": "string",
|
||||
"enum": ["eslint"],
|
||||
"default": "eslint"
|
||||
},
|
||||
"skipFormat": {
|
||||
"description": "Skip formatting files.",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"linter": {
|
||||
"description": "The tool to use for running lint checks.",
|
||||
"type": "string",
|
||||
"enum": ["eslint", "none"],
|
||||
"default": "none",
|
||||
"x-prompt": "Which linter would you like to use?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"unitTestRunner": {
|
||||
"type": "string",
|
||||
"enum": ["vitest", "none"],
|
||||
"description": "Test runner to use for unit tests.",
|
||||
"x-prompt": "Which unit test runner would you like to use?",
|
||||
"default": "none"
|
||||
"default": "none",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"e2eTestRunner": {
|
||||
"type": "string",
|
||||
@@ -100,7 +103,7 @@
|
||||
}
|
||||
},
|
||||
"required": ["directory"],
|
||||
"examplesFile": "---\ntitle: Nuxt application generator examples\ndescription: This page contains examples for the @nx/nuxt:app generator.\n---\n\nYour new Nuxt application will be generated with the following directory structure, following the suggested [directory structure](https://nuxt.com/docs/guide/directory-structure) for Nuxt applications:\n\n```text\nmy-nuxt-app\n├── nuxt.config.ts\n├── project.json\n├── src\n│ ├── app.vue\n│ ├── assets\n│ │ └── css\n│ │ └── styles.css\n│ ├── components\n│ │ └── NxWelcome.vue\n│ ├── pages\n│ │ ├── about.vue\n│ │ └── index.vue\n│ ├── public\n│ │ └── favicon.ico\n│ └── server\n│ ├── api\n│ │ └── greet.ts\n│ └── tsconfig.json\n├── tsconfig.app.json\n├── tsconfig.json\n├── tsconfig.spec.json\n└── vitest.config.ts\n```\n\nYour new app will contain the following:\n\n- Two pages (home and about) under `pages`\n- A component (`NxWelcome`) under `components`\n- A `greet` API endpoint that returns a JSON response under `/api/greet`\n- Configuration for `vitest`\n- Your app's entrypoint (`app.vue`) will contain the navigation links to the home and about pages, and the `nuxt-page` component to display the contents of your pages.\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Create app in a directory\" %}\n\n{% callout type=\"note\" title=\"Directory Flag Behavior Changes\" %}\nThe command below uses the `as-provided` directory flag behavior, which is the default in Nx 16.8.0. If you're on an earlier version of Nx or using the `derived` option, use `--directory=nested`. See the [as-provided vs. derived documentation](/deprecated/as-provided-vs-derived) for more details.\n{% /callout %}\n\n```shell\nnx g @nx/nuxt:app =apps/nested/myapp\n```\n\n{% /tab %}\n\n{% tab label=\"Create app with vitest configured\" %}\n\n```shell\nnx g @nx/nuxt:app apps/nested/myapp --unitTestRunner=vitest\n```\n\n{% /tab %}\n\n{% tab label=\"Use plain JavaScript (not TypeScript)\" %}\n\n```shell\nnx g @nx/nuxt:app apps/myapp --js\n```\n\n{% /tab %}\n{% /tabs %}\n\n## Generate pages and components\n\nYou can use the the [`@nx/vue:component` generator](/nx-api/vue/generators/component) to generate new pages and components for your application. You can read more on the [`@nx/vue:component` generator documentation page](/nx-api/vue/generators/component), but here are some examples:\n\n{% tabs %}\n{% tab label=\"New page\" %}\n\n```shell\nnx g @nx/nuxt:component my-app/src/pages/my-page\n```\n\n{% /tab %}\n\n{% tab label=\"New component\" %}\n\n```shell\nnx g @nx/nuxt:component my-app/src/components/my-cmp\n```\n\n{% /tab %}\n{% /tabs %}\n",
|
||||
"examplesFile": "---\ntitle: Nuxt application generator examples\ndescription: This page contains examples for the @nx/nuxt:app generator.\n---\n\nYour new Nuxt application will be generated with the following directory structure, following the suggested [directory structure](https://nuxt.com/docs/guide/directory-structure) for Nuxt applications:\n\n```text\nmy-nuxt-app\n├── nuxt.config.ts\n├── project.json\n├── src\n│ ├── app.vue\n│ ├── assets\n│ │ └── css\n│ │ └── styles.css\n│ ├── components\n│ │ └── NxWelcome.vue\n│ ├── pages\n│ │ ├── about.vue\n│ │ └── index.vue\n│ ├── public\n│ │ └── favicon.ico\n│ └── server\n│ ├── api\n│ │ └── greet.ts\n│ └── tsconfig.json\n├── tsconfig.app.json\n├── tsconfig.json\n├── tsconfig.spec.json\n└── vitest.config.ts\n```\n\nYour new app will contain the following:\n\n- Two pages (home and about) under `pages`\n- A component (`NxWelcome`) under `components`\n- A `greet` API endpoint that returns a JSON response under `/api/greet`\n- Configuration for `vitest`\n- Your app's entrypoint (`app.vue`) will contain the navigation links to the home and about pages, and the `nuxt-page` component to display the contents of your pages.\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Create app in a nested directory\" %}\n\n```shell\nnx g @nx/nuxt:app apps/nested/myapp\n```\n\n{% /tab %}\n\n{% tab label=\"Create app with vitest configured\" %}\n\n```shell\nnx g @nx/nuxt:app apps/nested/myapp --unitTestRunner=vitest\n```\n\n{% /tab %}\n\n{% tab label=\"Use plain JavaScript (not TypeScript)\" %}\n\n```shell\nnx g @nx/nuxt:app apps/myapp --js\n```\n\n{% /tab %}\n{% /tabs %}\n\n## Generate pages and components\n\nYou can use the the [`@nx/vue:component` generator](/nx-api/vue/generators/component) to generate new pages and components for your application. You can read more on the [`@nx/vue:component` generator documentation page](/nx-api/vue/generators/component), but here are some examples:\n\n{% tabs %}\n{% tab label=\"New page\" %}\n\n```shell\nnx g @nx/nuxt:component my-app/src/pages/my-page\n```\n\n{% /tab %}\n\n{% tab label=\"New component\" %}\n\n```shell\nnx g @nx/nuxt:component my-app/src/components/my-cmp\n```\n\n{% /tab %}\n{% /tabs %}\n",
|
||||
"presets": []
|
||||
},
|
||||
"aliases": ["app"],
|
||||
|
||||
@@ -28,6 +28,7 @@ Install `create-nx-workspace` globally to invoke the command directly, or use `n
|
||||
| `--defaultBase` | string | Default base to use for new projects. (Default: `main`) |
|
||||
| `--docker` | boolean | Generate a Dockerfile for the Node API. |
|
||||
| `--e2eTestRunner` | `playwright`, `cypress`, `none` | Test runner to use for end to end (E2E) tests. |
|
||||
| `--formatter` | string | Code formatter to use. |
|
||||
| `--framework` | string | Framework option to be used with certain stacks. |
|
||||
| `--help` | boolean | Show help. |
|
||||
| `--interactive` | boolean | Enable interactive mode with presets. (Default: `true`) |
|
||||
@@ -45,6 +46,7 @@ Install `create-nx-workspace` globally to invoke the command directly, or use `n
|
||||
| `--style` | string | Stylesheet type to be used with certain stacks. |
|
||||
| `--useGitHub` | boolean | Will you be using GitHub as your git hosting provider? (Default: `false`) |
|
||||
| `--version` | boolean | Show version number. |
|
||||
| `--workspaces` | boolean | Use package manager workspaces. (Default: `false`) |
|
||||
| `--workspaceType` | `integrated`, `package-based`, `standalone` | The type of workspace to create. |
|
||||
|
||||
## Presets
|
||||
|
||||
@@ -67,25 +67,9 @@ The `targetName` and `ciTargetName` options control the name of the inferred Pla
|
||||
|
||||
### Splitting E2E Tests
|
||||
|
||||
The `@nx/playwright/plugin` will automatically split your e2e tasks by file if you provide a `ciTargetName`. You can read more about the Atomizer feature [here](/ci/features/split-e2e-tasks). This will create a target with that name which can be used in CI to run the tests for each file in a distributed fashion.
|
||||
`@nx/playwright/plugin` leverages Nx Atomizer to split your e2e tests into smaller tasks in a fully automated way. This allows for a much more efficient distribution of tasks in CI. You can read more about the Atomizer feature [here](/ci/features/split-e2e-tasks).
|
||||
|
||||
```json {% fileName="nx.json" %}
|
||||
{
|
||||
"plugins": [
|
||||
{
|
||||
"plugin": "@nx/playwright/plugin",
|
||||
"options": {
|
||||
"targetName": "e2e",
|
||||
"ciTargetName": "e2e-ci"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Splitting E2E tasks by file
|
||||
|
||||
The `@nx/playwright/plugin` will automatically split your e2e tasks by file. You can read more about this feature [here](/ci/features/split-e2e-tasks).
|
||||
If you would like to disable Atomizer for Playwright tasks, set `ciTargetName` to `false`.
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="Nx < 18" %}
|
||||
@@ -159,6 +143,46 @@ 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 Project/Target Browser
|
||||
|
||||
The default generated Playwright configuration will contain a `projects` property that contains a list of browsers to run the tests against.
|
||||
|
||||
It should look similar to this:
|
||||
|
||||
```ts
|
||||
export default defineConfig({
|
||||
...,
|
||||
projects: [
|
||||
{
|
||||
name: "chromium",
|
||||
use: { ...devices["Desktop Chrome"] },
|
||||
},
|
||||
|
||||
{
|
||||
name: "firefox",
|
||||
use: { ...devices["Desktop Firefox"] },
|
||||
},
|
||||
|
||||
{
|
||||
name: "webkit",
|
||||
use: { ...devices["Desktop Safari"] },
|
||||
}
|
||||
]
|
||||
});
|
||||
```
|
||||
|
||||
By default, Playwright will run tests against all browsers in the `projects` list.
|
||||
|
||||
You can specify a specific browser to run the tests against by passing the `--project` flag to the `nx e2e` command.
|
||||
|
||||
```shell
|
||||
nx e2e frontend-e2e -- --project=firefox
|
||||
```
|
||||
|
||||
{% callout type="note" title="Argument Forwarding" %}
|
||||
As Nx also has a `--project` argument, you need to use `--` to forward the argument to the Playwright configuration.
|
||||
{% /callout %}
|
||||
|
||||
### Specifying a Base Url
|
||||
|
||||
The `baseURL` property within the Playwright configuration can control where the tests visit by default.
|
||||
|
||||
@@ -7,27 +7,19 @@
|
||||
"$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 tools/my-plugin/src/executors/build\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 tools/my-plugin/src/executors/build --includeHasher\n```\n\n{% /tab %}\n{% /tabs %}\n",
|
||||
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Basic executor\" %}\n\nCreate a new executor called `build` at `tools/my-plugin/src/executors/build.ts`:\n\n```bash\nnx g @nx/plugin:executor tools/my-plugin/src/executors/build.ts\n```\n\n{% /tab %}\n{% tab label=\"Without providing the file extension\" %}\n\nCreate a new executor called `build` at `tools/my-plugin/src/executors/build.ts`:\n\n```bash\nnx g @nx/plugin:executor tools/my-plugin/src/executors/build\n```\n\n{% /tab %}\n{% tab label=\"With different exported name\" %}\n\nCreate a new executor called `custom` at `tools/my-plugin/src/executors/build.ts`:\n\n```bash\nnx g @nx/plugin:executor tools/my-plugin/src/executors/build.ts --name=custom\n```\n\n{% /tab %}\n{% tab label=\"With custom hashing\" %}\n\nCreate a new executor called `build` at `tools/my-plugin/src/executors/build.ts`, that uses a custom hashing function:\n\n```bash\nnx g @nx/plugin:executor tools/my-plugin/src/executors/build --includeHasher\n```\n\n{% /tab %}\n{% /tabs %}\n",
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"command": "nx g executor my-executor --project=my-plugin",
|
||||
"description": "Generate `libs/my-plugin/src/executors/my-executor`"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "Path at which to generate the executor file.",
|
||||
"x-prompt": "What path would you like to use for the executor?",
|
||||
"description": "The file path to the executor. Relative to the current working directory.",
|
||||
"x-prompt": "What is the executor file path?",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-priority": "important"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Executor name.",
|
||||
"x-prompt": "What name would you like to use for the executor?",
|
||||
"x-priority": "important"
|
||||
"description": "The executor name to export in the plugin executors collection."
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
|
||||
@@ -10,23 +10,29 @@
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"command": "nx g generator libs/my-plugin/src/generators//my-generator",
|
||||
"description": "Generate `libs/my-plugin/src/generators/my-generator`"
|
||||
"description": "Generate a generator exported with the name matching the file name. It results in the generator `foo` at `mylib/src/generators/foo.ts`",
|
||||
"command": "nx g @nx/plugin:generator mylib/src/generators/foo.ts"
|
||||
},
|
||||
{
|
||||
"description": "Generate a generator without providing the file extension. It results in the generator `foo` at `mylib/src/generators/foo.ts`",
|
||||
"command": "nx g @nx/plugin:generator mylib/src/generators/foo"
|
||||
},
|
||||
{
|
||||
"description": "Generate a generator exported with a different name from the file name. It results in the generator `custom` at `mylib/src/generators/foo.ts`",
|
||||
"command": "nx g @nx/plugin:generator mylib/src/generators/foo --name=custom"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "Path where the generator will be generated.",
|
||||
"description": "The file path to the generator. Relative to the current working directory.",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the generator be generated?",
|
||||
"x-prompt": "What is the generator file path?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Generator name.",
|
||||
"x-prompt": "What name would you like to use for the generator?",
|
||||
"x-priority": "important"
|
||||
"description": "The generator name to export in the plugin generators collection."
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
|
||||
@@ -10,22 +10,29 @@
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"command": "nx g migration my-plugin/my-migration --version=1.0.0",
|
||||
"description": "Adds a new migration inside `my-plugin`, which will be triggered when migrating to version 1.0.0 or above from a previous version."
|
||||
"description": "Generate a migration exported with the name matching the file name, which will be triggered when migrating to version 1.0.0 or above from a previous version. It results in the migration `foo` at `mylib/src/migrations/foo.ts`",
|
||||
"command": "nx g @nx/plugin:migration mylib/src/migrations/foo.ts -v=1.0.0"
|
||||
},
|
||||
{
|
||||
"description": "Generate a migration without providing the file extension, which will be triggered when migrating to version 1.0.0 or above from a previous version. It results in the migration `foo` at `mylib/src/migrations/foo.ts`",
|
||||
"command": "nx g @nx/plugin:migration mylib/src/migrations/foo -v=1.0.0"
|
||||
},
|
||||
{
|
||||
"description": "Generate a migration exported with a different name from the file name, which will be triggered when migrating to version 1.0.0 or above from a previous version. It results in the migration `custom` at `mylib/src/migrations/foo.ts`",
|
||||
"command": "nx g @nx/plugin:migration mylib/src/migrations/foo --name=custom -v=1.0.0"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "Path where the migration will be generated.",
|
||||
"description": "The file path to the migration without the file extension. Relative to the current working directory.",
|
||||
"$default": { "$source": "argv", "index": 0 },
|
||||
"x-prompt": "Where should the migration be generated?",
|
||||
"x-prompt": "What is the migration file path?",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Migration name.",
|
||||
"x-priority": "important"
|
||||
"description": "The migration name to export in the plugin migrations collection."
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
|
||||