Nx
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.
Let's see how to integrate a Keycloakify theme into a Nx project with integrated monorepo.
In this example we'll start with the Nx Vite starter

Next up we want to repatriate the Keycloakify Starter template sources. We only copy over the src and .storybook directory.

Now if you run npm run build-keycloak-theme
it will generate the JAR in dist/apps/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
OR
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?