aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar garronej <[email protected]>2023-04-18 17:36:35 +0200
committerGravatar garronej <[email protected]>2023-04-18 17:36:35 +0200
commit98d251aff0ad15ab8dd5e8893f7248bde3c65274 (patch)
tree00790114319faba9590e8b0b04d6266ddf0b36ce
parentBump version (diff)
https://github.com/keycloakify/keycloakify/issues/303
-rw-r--r--README.md12
-rwxr-xr-xpackage.json5
2 files changed, 8 insertions, 9 deletions
diff --git a/README.md b/README.md
index e6e5e45..e113b8a 100644
--- a/README.md
+++ b/README.md
@@ -22,20 +22,16 @@ If you are only looking to create a theme (and not a theme + an App) there are a
```bash
yarn # install dependencies (it's like npm install)
-yarn build-keycloak-theme # Build the theme one time (some assets will be copied to
- # public/keycloak_static, they are needed to dev your page
- # outside of Keycloak)
-
-yarn start # See the Hello World app
- # Uncomment line 15 of src/keycloak-theme/login/kcContext, reload https://localhost:3000
- # You can now develop your Login pages. (Don't forget to comment it back when you're done)
-
yarn storybook # Start Storybook
# This is by far the best way to develop your theme
# This enable to quickly see your pages in isolation and in different states.
# You can create stories even for pages that you haven't explicitly overloaded. See src/keycloak-theme/login/pages/LoginResetPassword.stories.tsx
# See Keycloakify's storybook for if you need a starting point for your stories: https://github.com/keycloakify/keycloakify/tree/main/stories
+yarn start # See the Hello World app
+ # Uncomment line 15 of src/keycloak-theme/login/kcContext, reload https://localhost:3000
+ # You can now develop your Login pages. (Don't forget to comment it back when you're done)
+
yarn build-keycloak-theme # Actually build the theme
# Read the instruction printed on the console to see how to test
# your theme on a real Keycloak instance.
diff --git a/package.json b/package.json
index 2eb2178..507f27f 100755
--- a/package.json
+++ b/package.json
@@ -8,13 +8,16 @@
"url": "git://github.com/codegouvfr/keycloakify-starter.git"
},
"scripts": {
+ "prestart": "yarn ensure-public-keycloak-static-exists",
"start": "react-scripts start",
"build": "react-scripts build",
"build-keycloak-theme": "yarn build && keycloakify",
"eject-keycloak-page": "eject-keycloak-page",
"download-builtin-keycloak-theme": "download-builtin-keycloak-theme",
+ "prestorybook": "yarn ensure-public-keycloak-static-exists",
"storybook": "start-storybook -p 6006",
- "build-storybook": "build-storybook"
+ "build-storybook": "build-storybook",
+ "ensure-public-keycloak-static-exists": "[ ! -d 'public/keycloak_static' ] && yarn build-keycloak-theme || true"
},
"keycloakify": {
"extraThemeProperties": [