generator-begcode
Version:
Spring Boot + Angular/React/Vue in one handy generator
36 lines (35 loc) • 1.27 kB
JavaScript
import BaseApplicationGenerator from '../base-application/index.js';
export default class KafkaGenerator extends BaseApplicationGenerator {
async beforeQueue() {
if (!this.fromBlueprint) {
await this.composeWithBlueprints();
}
if (!this.delegateToBlueprint) {
await this.dependsOnBootstrapApplicationServer();
}
}
get composing() {
return this.asComposingTaskGroup({
async compose() {
const { messageBroker } = this.jhipsterConfig;
await this.composeWithJHipster(`begcode:spring-cloud-stream:${messageBroker}`);
},
});
}
get [BaseApplicationGenerator.COMPOSING]() {
return this.delegateTasksToBlueprint(() => this.composing);
}
get preparing() {
return this.asPreparingTaskGroup({
preparing({ application }) {
application.packageInfoJavadocs?.push({
packageName: `${application.packageName}.broker`,
documentation: 'Spring cloud consumers and providers',
});
},
});
}
get [BaseApplicationGenerator.PREPARING]() {
return this.delegateTasksToBlueprint(() => this.preparing);
}
}