@barcidev/ngx-autogen 0.1.46 → 0.1.47
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/package.json +1 -1
- package/src/transloco/index.js +4 -3
package/package.json
CHANGED
package/src/transloco/index.js
CHANGED
|
@@ -138,9 +138,10 @@ function registerProviderInComponent(options, componentFile) {
|
|
|
138
138
|
function resolveComponentContext(tree, options) {
|
|
139
139
|
const fullPath = process.cwd();
|
|
140
140
|
const srcIndex = fullPath.lastIndexOf("src");
|
|
141
|
-
const path =
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
const path = options.path ||
|
|
142
|
+
(0, path_1.normalize)(srcIndex !== -1
|
|
143
|
+
? fullPath.substring(srcIndex)
|
|
144
|
+
: (0, path_1.join)((0, path_1.normalize)("src"), "app"));
|
|
144
145
|
const directory = tree.getDir(path);
|
|
145
146
|
const componentFile = directory.subfiles.find((f) => f.endsWith(".component.ts")) ||
|
|
146
147
|
directory.subfiles.find((f) => f.endsWith(".ts"));
|