generator-jhipster-yellowbricks 1.2.3 → 1.2.4
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/generators/app/generator.js +16 -6
- package/package.json +1 -1
|
@@ -24,18 +24,28 @@ function getGen(pkgName) {
|
|
|
24
24
|
|
|
25
25
|
export default class extends BaseApplicationGenerator {
|
|
26
26
|
constructor(args, opts, features) {
|
|
27
|
+
const { version } = require('../../package.json');
|
|
28
|
+
console.log('');
|
|
29
|
+
console.log('========================================');
|
|
30
|
+
console.log(` YellowBricks blueprint v${version} `);
|
|
31
|
+
console.log('========================================');
|
|
32
|
+
console.log('');
|
|
27
33
|
super(args, opts, { ...features, sbsBlueprint: true });
|
|
34
|
+
|
|
35
|
+
// JHipster v8's yeoman-environment doesn't implement getContextMap (added in v9).
|
|
36
|
+
// Polyfill it so the v9-based base generator can run inside a v8 environment.
|
|
37
|
+
if (!('getContextMap' in this.env)) {
|
|
38
|
+
const contextStore = new Map();
|
|
39
|
+
this.env.getContextMap = (key, factory = () => new Map()) => {
|
|
40
|
+
if (!contextStore.has(key)) contextStore.set(key, factory());
|
|
41
|
+
return contextStore.get(key);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
28
44
|
}
|
|
29
45
|
|
|
30
46
|
get [BaseApplicationGenerator.COMPOSING]() {
|
|
31
47
|
return this.asComposingTaskGroup({
|
|
32
48
|
async composeBricks() {
|
|
33
|
-
console.log('');
|
|
34
|
-
console.log('========================================');
|
|
35
|
-
console.log(' YellowBricks blueprint ');
|
|
36
|
-
console.log('========================================');
|
|
37
|
-
console.log('');
|
|
38
|
-
|
|
39
49
|
let useList = this.blueprintConfig.use ?? [];
|
|
40
50
|
|
|
41
51
|
const jsoncPath = join(this.destinationRoot(), '.yellowbricks.jsonc');
|
package/package.json
CHANGED