Package Manager Workspaces
Last updated
Was this helpful?
Last updated
Was this helpful?
Let's assume we have a monorepo project where sub applications are stored in the apps/ directory.
Then, you want to create a new app called, for example 'keycloak-theme' and initialize it with the code of the starter template:
Now you want to update the name field of your apps/keycloak-theme/package.json to match the name of your sub app.
Now you can add a script in your root package json to build the theme and start the keycloak dev server:
Now you can run:
In this configuration when you run pnpm run build-keycloak-theme
from the root of your monorepo a single keycloak-theme.jar
will be generated in dist/apps/keycloak-theme:
cd apps/keycloak-theme && npx keycloakify add-story
npx keycloakify add-story -p apps/keycloak-theme
from the root of your monorepo.
You also want to provide an actual name to your theme as you want it to .
Two common thing you might want to do is and .
When you want to use the keycloakify CLI commands you can either cd into your keycloakify sub app directory or use the . Like for example if you want to run add-story you can do either: