I'm new in JHipster, but I already have a task - to make a blueprint for an Angular client side change with jhipster-generator (by npx jhipster generate-blueprint)
What I did:
- Generated non-local blueprint
- Copy angular folder from
node_modules/generator-jhipster. So, structure is follow:
structure of blueprint project
Injected a new markup
Created "
npm link"Generate project connected to this blueprint.
Package-json of blueprint: package.json of blueprint
I edited template file of Angular, added this to files in generator.mjs:
get [AngularGenerator.WRITING]() { return this.asWritingTaskGroup({ ...super.writing, async writingTemplateTask({ application }) { await this.writeFiles({ sections: { files: [{ templates: ['/src/main/webapp/app/entities/_entityFolder/list/_entityFile.component.html.ejs'] }], }, context: application, }); }, });}
My problem:
How to inject in my project Jhipster context? All variables, as I understand it, can be taken from the JHipster context. Also, I want to add new functionality, that is, also expand the context. How to interact with the context? Thanks for the answer