ngx-blocks-studio 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -0
- package/fesm2022/ngx-blocks-studio.mjs +1447 -0
- package/fesm2022/ngx-blocks-studio.mjs.map +1 -0
- package/package.json +26 -0
- package/types/ngx-blocks-studio.d.ts +520 -0
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# BlocksStudio
|
|
2
|
+
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.
|
|
4
|
+
|
|
5
|
+
Angular library for config-driven routing and registries. See the [documentation](../../docs/README.md) for full API and usage.
|
|
6
|
+
|
|
7
|
+
## Route loader
|
|
8
|
+
|
|
9
|
+
**RouteLoader** loads route configuration from a JSON URL, resolves components and guards by name via **ComponentRegistry** and **GuardRegistry**, and applies the resulting `Routes` to the router. Config is exposed as signals (`routeConfigFile`, `configPath`, `routeConfig`).
|
|
10
|
+
|
|
11
|
+
- **RouteConfig** – `path`, `component` (registry key), optional `title`, guard keys (`canActivate`, etc.), `data`, and `children` (`RouteConfigs`: routes + optional `defaultRedirect` / `catchAllRedirect`).
|
|
12
|
+
- **RouteConfigs** – `routes: RouteConfig[]`, optional `defaultRedirect` and `catchAllRedirect` (used at top-level and for each route’s `children`).
|
|
13
|
+
|
|
14
|
+
Register all component and guard keys before loading. Use `loadRoutes(config)` for in-memory config or `loadRoutesFromUrl(url)` to fetch from a URL. Full details: [Route loader docs](../../docs/core/router-loader.md).
|
|
15
|
+
|
|
16
|
+
## Code scaffolding
|
|
17
|
+
|
|
18
|
+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
ng generate component component-name
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
ng generate --help
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Building
|
|
31
|
+
|
|
32
|
+
To build the library, run:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
ng build blocks-studio
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
39
|
+
|
|
40
|
+
### Publishing the Library
|
|
41
|
+
|
|
42
|
+
Once the project is built, you can publish your library by following these steps:
|
|
43
|
+
|
|
44
|
+
1. Navigate to the `dist` directory:
|
|
45
|
+
```bash
|
|
46
|
+
cd dist/blocks-studio
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
50
|
+
```bash
|
|
51
|
+
npm publish
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Running unit tests
|
|
55
|
+
|
|
56
|
+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
ng test
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Running end-to-end tests
|
|
63
|
+
|
|
64
|
+
For end-to-end (e2e) testing, run:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
ng e2e
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
71
|
+
|
|
72
|
+
## Additional Resources
|
|
73
|
+
|
|
74
|
+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|