How to interact with JHipster context in blueprints

26 Views Asked by At

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:

  1. Generated non-local blueprint
  2. Copy angular folder from node_modules/generator-jhipster. So, structure is follow:

structure of blueprint project

  1. Injected a new markup

  2. Created "npm link"

  3. Generate project connected to this blueprint.

Package-json of blueprint: package.json of blueprint

  1. 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:

error

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

0

There are 0 best solutions below