From f70625bf3f5010d079285c656972e26fa0b9d3b7 Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Sat, 27 Feb 2021 18:19:02 +0100 Subject: [PATCH] improve docs --- README.md | 7 ++++--- src/bin/build-keycloak-theme/index.ts | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4ccd168a..77792666 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@

-# MOTIVATION +# Motivations The problem: @@ -74,7 +74,8 @@ and a `static/` directory generated by webpack. **All this is defaults with [`create-react-app`](https://create-react-app.dev)** (tested with 4.0.3=) - For building the theme: `mvn` (Maven) must be installed -- For development, (testing the theme in a local container ): `rm`, `mkdir`, `wget`, `unzip` are assumed to be available. +- For development, (testing the theme in a local container ): `rm`, `mkdir`, `wget`, `unzip` are assumed to be available + and `docker` up and running. NOTE: This build tool has only be tested on MacOS. @@ -87,7 +88,7 @@ Part of the lib that runs with node, at build time. - `npx build-keycloak-theme`: Builds the theme, the CWD is assumed to be the root of your react project. - `npx download-sample-keycloak-themes`: Downloads the keycloak default themes (for development purposes) -## The fronted lib ( imported into your react +## The fronted lib ( imported into your react app ) Part of the lib that you import in your react project and runs on the browser. diff --git a/src/bin/build-keycloak-theme/index.ts b/src/bin/build-keycloak-theme/index.ts index 1f097401..136abf5f 100644 --- a/src/bin/build-keycloak-theme/index.ts +++ b/src/bin/build-keycloak-theme/index.ts @@ -68,13 +68,13 @@ if (require.main === module) { '', 'To test your theme locally, with hot reloading, you can spin up a Keycloak container image with the theme loaded by running:', '', - `$ ./${pathRelative(reactProjectDirPath, pathJoin(keycloakThemeBuildingDirPath, containerLaunchScriptBasename))}`, + `👉 $ ./${pathRelative(reactProjectDirPath, pathJoin(keycloakThemeBuildingDirPath, containerLaunchScriptBasename))} 👈`, '', - 'To enable the theme within keycloak log into the admin console ( username: admin, password: admin), create a realm (called "myrealm" for example),', + 'To enable the theme within keycloak log into the admin console ( 👉 http://localhost:8080 username: admin, password: admin 👈), create a realm (called "myrealm" for example),', `go to your realm settings, click on the theme tab then select ${parsedPackageJson.name}.`, `More details: https://www.keycloak.org/getting-started/getting-started-docker`, '', - 'Once your container is up and configured 👉 http://localhost:8080/auth/realms/myrealm/account', + 'Once your container is up and configured 👉 http://localhost:8080/auth/realms/myrealm/account 👈', '', ].join("\n"));