@barcidev/ngx-autogen 0.1.1 → 0.1.3
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.es.md +1 -1
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/ng-add/index.js +1 -0
- package/src/ng-add/schema.d.ts +1 -0
- package/src/ng-add/schema.json +7 -1
- package/src/ngrx/store/index.js +8 -3
package/README.es.md
CHANGED
|
@@ -23,7 +23,7 @@ El proyecto se lanza inicialmente con un enfoque en la gestión de estado, pero
|
|
|
23
23
|
Puedes instalar el paquete en tu proyecto Angular mediante angular cli para que se configure automáticamente el proyecto con las dependencias necesarias:
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
ng add ngx-autogen
|
|
26
|
+
ng add @barcidev/ngx-autogen
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
## 🛠️ Uso
|
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ The project is initially launched with a focus on state management, but is desig
|
|
|
23
23
|
You can install the package in your Angular project using Angular CLI so that the project is automatically configured with the necessary dependencies:
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
ng add ngx-autogen
|
|
26
|
+
ng add @barcidev/ngx-autogen
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
## 🛠️ Usage
|
package/package.json
CHANGED
package/src/ng-add/index.js
CHANGED
package/src/ng-add/schema.d.ts
CHANGED
package/src/ng-add/schema.json
CHANGED
|
@@ -8,7 +8,13 @@
|
|
|
8
8
|
"description": "The name of the default Primary Key (e.g., id, cod, uuid); default is 'id'.",
|
|
9
9
|
"x-prompt": "What is the name of the default Primary Key (e.g., id, cod, uuid)?",
|
|
10
10
|
"default": "id"
|
|
11
|
+
},
|
|
12
|
+
"path": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "The path where the state management files will be created.",
|
|
15
|
+
"x-prompt": "Where do you want to create the state management files?",
|
|
16
|
+
"default": "src/app/core"
|
|
11
17
|
}
|
|
12
18
|
},
|
|
13
|
-
"required": ["pk"]
|
|
19
|
+
"required": ["pk", "path"]
|
|
14
20
|
}
|
package/src/ngrx/store/index.js
CHANGED
|
@@ -64,9 +64,14 @@ function signalStore(options) {
|
|
|
64
64
|
return (tree) => __awaiter(this, void 0, void 0, function* () {
|
|
65
65
|
var _a;
|
|
66
66
|
const workspace = yield (0, workspace_1.getWorkspace)(tree);
|
|
67
|
-
const globalConfig = (_a = workspace.extensions.schematics) === null || _a === void 0 ? void 0 : _a["ngx-autogen:all"];
|
|
68
|
-
if (globalConfig
|
|
69
|
-
|
|
67
|
+
const globalConfig = (_a = workspace.extensions.schematics) === null || _a === void 0 ? void 0 : _a["@barcidev/ngx-autogen:all"];
|
|
68
|
+
if (globalConfig) {
|
|
69
|
+
if (globalConfig.pk && !options.pk) {
|
|
70
|
+
options.pk = globalConfig.pk;
|
|
71
|
+
}
|
|
72
|
+
if (globalConfig.path && !options.path) {
|
|
73
|
+
options.path = globalConfig.path;
|
|
74
|
+
}
|
|
70
75
|
}
|
|
71
76
|
treeRef = tree;
|
|
72
77
|
const movePath = (0, core_1.normalize)(options.path);
|