generator-jhipster-yellowbricks
v1.2.5
Published
Yellowbricks main blueprint — orchestrates all yellowbricks in a single JHipster blueprint
Maintainers
Readme
generator-jhipster-yellowbricks
blueprint — a JHipster blueprint that orchestrates all yellowbricks selected in
.yellowbricks.jsonc.
Concept
generator-jhipster-yellowbricks ← (aggregator + orchestrator) blueprint
├── generator-jhipster-yellowbricks-angular-contextpath
├── generator-jhipster-yellowbricks-spring-boot-contextpath
├── generator-jhipster-yellowbricks-client-contextpath
├── generator-jhipster-yellowbricks-angular-relativepathresource
└── generator-jhipster-yellowbricks-client-relativepathresourceRules
- Every yellowbrick is a standalone JHipster blueprint — usable without this meta package
- This meta package exists only to group and activate them
- Each brick has exactly one responsibility
Available yellowbricks
| Yellowbrick name | What it does |
| ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- |
| generator-jhipster-yellowbricks-angular-contextpath | Sets baseHref in angular.json |
| generator-jhipster-yellowbricks-spring-boot-contextpath | Sets context-path in application.yml |
| generator-jhipster-yellowbricks-client-contextpath | Sets <base href> in index.html and swagger-ui/index.html |
| generator-jhipster-yellowbricks-angular-relativepathresource | Makes logo URL relative in navbar.scss |
| generator-jhipster-yellowbricks-client-relativepathresource | Makes logo URL relative in loading.css |
Prerequisites
- Node.js
^22.18.0 || >=24.11.0 - JHipster 9
Installation
npm install -g generator-jhipster-yellowbricksUsage
Create a .yellowbricks.jsonc in your project directory. It supports comments, so you can easily toggle bricks and document your choices.
[!TIP] Only activate bricks that match your stack. If your JHipster app uses Vue or React instead of Angular, skip
angular-contextpathandangular-relativepathresource— those bricks target Angular-specific files that won't exist in your project.
{
// Order matters — bricks are activated in the order listed
"use": [
"generator-jhipster-yellowbricks-angular-contextpath",
"generator-jhipster-yellowbricks-spring-boot-contextpath",
"generator-jhipster-yellowbricks-client-contextpath",
"generator-jhipster-yellowbricks-angular-relativepathresource",
"generator-jhipster-yellowbricks-client-relativepathresource",
// "generator-jhipster-yellowbricks-vue-relativepathresource", // uncomment vue but don't forget to comment -angular-
],
// Configuration for bricks that need it:
// Keep contextPath the same across all context path bricks
"generator-jhipster-yellowbricks-angular-contextpath": { "contextPath": "/jh/" },
"generator-jhipster-yellowbricks-spring-boot-contextpath": { "contextPath": "/jh/" },
"generator-jhipster-yellowbricks-client-contextpath": { "contextPath": "/jh/" },
}The angular-relativepathresource and client-relativepathresource bricks require no configuration.
Then run JHipster with this blueprint:
# Standard generator
jhipster --blueprints yellowbricks
# With JDL
jhipster import-jdl your-app.jdl --blueprints yellowbricksHow to create a new yellowbrick
All yellowbricks start from the generator-jhipster-yellowbricks- prefix followed by the generator name and a purpose suffix.
To find the generator name, search the JHipster source for the template file you want to modify: https://github.com/search?q=repo%3Ajhipster%2Fgenerator-jhipster&type=code
For example, generators/angular/templates/angular.json.ejs lives under generators/angular — so the generator name is angular and the brick would be generator-jhipster-yellowbricks-angular-<purpose>.
Bricks that modify existing JHipster output
Override the specific sub-generator with sbsBlueprint: true:
mkdir generator-jhipster-yellowbricks-<generator>-<purpose>
cd generator-jhipster-yellowbricks-<generator>-<purpose>
jhipster generate-blueprint --sub-generators <generator> --all-priorities --defaults --skip-gitAnswer:
| Prompt | Answer |
| ---------------------------------------------------- | ------ |
| Is <generator> generator a side-by-side blueprint? | Y |
| Is <generator> generator a cli command? | N |
Bricks that add new files
Override the app generator with sbsBlueprint: true:
jhipster generate-blueprint --sub-generators app --defaults --skip-gitAnswer:
| Prompt | Answer | | ------------------------------------------ | ------ | | Is app generator a side-by-side blueprint? | Y | | Is app generator a cli command? | N |
