generator-jhipster-yellowbricks 1.2.1 → 1.2.2
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { join } from 'node:path';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
4
|
|
|
5
5
|
import BaseApplicationGenerator from 'generator-jhipster/generators/base-application';
|
|
6
6
|
import stripJsonComments from 'strip-json-comments';
|
|
@@ -84,7 +84,10 @@ export default class extends BaseApplicationGenerator {
|
|
|
84
84
|
}
|
|
85
85
|
try {
|
|
86
86
|
const resolved = require.resolve(`${pkgName}/generators/${gen}`);
|
|
87
|
-
|
|
87
|
+
const packagePath = dirname(require.resolve(`${pkgName}/package.json`));
|
|
88
|
+
const namespace = `${pkgName}:${gen}`;
|
|
89
|
+
this.env.register(resolved, { namespace, packagePath });
|
|
90
|
+
await this.composeWith(namespace);
|
|
88
91
|
console.log(`[yellowbricks] activated brick: ${pkgName}`);
|
|
89
92
|
} catch {
|
|
90
93
|
console.error(
|
package/package.json
CHANGED