Turborepo
If you're unsure what this section is about, this approach is NOT for you. Instead, follow the Quick Start Guide and fork the starter project.
First you want to create a new subproject in your monorepo, just clone the starter template into apps/keycloak-theme.
Change the name field in the package.json of your keycloakify sub app.
Give an actual name to your theme (as you want it to apprear in the Keycloak Admin Console)
Then you want to add a new script for building your theme in your root package.json
Add a turborepo task
You can now build your keycloak theme at the root of your monorepo by running
Optionally, if you want to change the location of the directory where the jar for your theme are created you can do:
If you applies those changes, when you'll run npm run build-keycloak-theme
your JARs are going to be generated in dist/keycloak-theme/
When you want to use the keycloakify CLI commands you can either cd into your keycloakify sub app directory or use the --project option of the Keycloakify CLI. Like for example if you want to run add-story you can do either:
cd apps/keycloak-theme && npx keycloakify add-story
npx keycloakify add-story -p apps/keycloak-theme
from the root of your monorepo
To go beyond the base configuration you might want to explore what build options are available. Starting with with keycloakVersionTargets
to make sure that you only generates the JARs file you need.
Last updated
Was this helpful?