https://github.com/beeman/nx-generators
Some shared NX Workspace Generators
https://github.com/beeman/nx-generators
Last synced: 7 months ago
JSON representation
Some shared NX Workspace Generators
- Host: GitHub
- URL: https://github.com/beeman/nx-generators
- Owner: beeman
- Created: 2022-03-03T07:36:25.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-08T11:49:03.000Z (over 3 years ago)
- Last Synced: 2025-01-31T14:16:41.250Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 1.05 MB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nx-generators
Some shared nx-generators
### Add generators
Run this in your Nx Workspace. It **WILL** delete any existing workspace-generators so make sure to commit any changes you want to store.
```shell
wget -O - https://raw.githubusercontent.com/beeman/nx-generators/main/setup.sh | bash
```
### Install dependencies
```shell
yarn add -D @nrwl/nest @nrwl/react ts-morph
```
### Run generators
#### api-feature
Generate basic feature:
```shell
nx workspace-generator api-feature core
# This will generate:
# - libs/api/core/data-access
# - libs/api/core/feature
```
To delete them use this command:
```shell
nx g remove api-core-feature && nx g remove api-core-data-access
```
You can generate a feature with `util` lib:
```shell
nx workspace-generator api-feature core --skipUtil fals
# This will generate:
# - libs/api/core/data-access
# - libs/api/core/feature
# - libs/api/core/util
```
You can generate a feature with CRUD (depends on `@prisma/client`):
```shell
nx workspace-generator api-feature company --crud --plural companies
```
# MIT License 2023 beeman