https://github.com/art-ws/ngx-ws
ngx-ws
https://github.com/art-ws/ngx-ws
Last synced: 4 months ago
JSON representation
ngx-ws
- Host: GitHub
- URL: https://github.com/art-ws/ngx-ws
- Owner: art-ws
- License: mit
- Created: 2021-11-13T10:31:43.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-06-14T11:06:52.000Z (5 months ago)
- Last Synced: 2025-06-14T11:37:29.263Z (5 months ago)
- Language: TypeScript
- Size: 185 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-angular - ngx-ws - Easily split a large `angular.json` into modular, project-local files using the power of [JSON References](https://www.npmjs.com/package/@apidevtools/json-schema-ref-parser), with the convenience of [YAML](https://yaml.org/) and [JSON5](https://json5.org/) formats. (Angular / CLI Tools)
- fucking-awesome-angular - ngx-ws - Easily split a large `angular.json` into modular, project-local files using the power of 🌎 [JSON References](www.npmjs.com/package/@apidevtools/json-schema-ref-parser), with the convenience of 🌎 [YAML](yaml.org/) and 🌎 [JSON5](json5.org/) formats. (Angular / CLI Tools)
README
# 🚀 ngx-ws
**Generate [angular.json](https://angular.dev/reference/configs/workspace-config) from modular, human-friendly definitions.**
Easily split a large `angular.json` into modular, project-local files using the power of [JSON References](https://www.npmjs.com/package/@apidevtools/json-schema-ref-parser), with the convenience of [YAML](https://yaml.org/) and [JSON5](https://json5.org/) formats.
---
## 🛠️ How It Works
1. **Install [ngx-ws](https://www.npmjs.com/package/ngx-ws) globally** (using your preferred package manager):
```sh
npm install -g ngx-ws
# or
pnpm add -g ngx-ws
# or
yarn global add ngx-ws
```
2. **Navigate to your Angular project directory** (where `angular.json` is located):
```sh
cd your-angular-project
```
3. **Initialize modular configuration files** from your existing `angular.json`:
```sh
ngx-ws --build
```
This generates `angular-workspace.yaml` and `angular-project.yaml` files.
4. **Edit your configuration** in the new YAML files.
You can now manage your workspace and project settings in a modular, human-friendly format.
5. **Regenerate `angular.json`** after making changes:
```sh
ngx-ws -v
```
This will update `angular.json` based on your YAML definitions.
---
**Tip:**
Once set up, you can focus on editing `angular-workspace.yaml` and `angular-project.yaml`.
Let `ngx-ws` handle the generation of `angular.json` for you!
## ✨ Features
- 📝 Supports [YAML](https://yaml.org/) and [JSON5](https://json5.org/) formats
- 🔗 Handles [JSON References](https://datatracker.ietf.org/doc/html/draft-pbryan-zyp-json-ref-03) for modular configuration
- 🔄 Recursive variable interpolation for flexible templating
- 🛠️ Simplifies configuration of [scripts, styles, and assets](https://angular.dev/reference/configs/workspace-config#styles-and-scripts-configuration)
---
## 🧩 Example
See the [ngx-ws-example](https://github.com/art-ws/ngx-ws-example) repository.
Pay special attention to [angular-workspace.yaml](https://github.com/art-ws/ngx-ws-example/blob/main/angular-workspace.yaml) and [angular-project.yaml](https://github.com/art-ws/ngx-ws-example/blob/main/projects/app1/angular-project.yaml).
---
## ⚙️ Options
| Option | Alias | Description |
| -------------- | ----- | ------------------------------------------------------------------ |
| `--build` | | Build files from `angular.json` |
| `--deps` | | Update `package.json` with project-specific dependencies |
| `--debug` | | Enable debug mode (retain temporary files) |
| `--dry-run` | | Preview changes without writing files |
| `--verbose` |`-v` | Enable verbose output |
| `--version` | | Print version |