From fd0bbcce753bb27f969df8e9a3f8414f6de2ba03 Mon Sep 17 00:00:00 2001 From: Berry den Hartog <38954346+berrydenhartog@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:28:12 +0100 Subject: [PATCH] Add basic setup --- .editorconfig | 14 ++++++ .github/CODEOWNERS | 1 + .github/dependabot.yml | 15 +++++++ .github/workflows/build.yaml | 45 +++++++++++++++++++ .gitignore | 3 ++ .nvmrc | 1 + META-INF/keycloak-themes.json | 6 +++ README.md | 9 ++++ compose.yaml | 11 +++++ package.json | 17 +++++++ .../nl-design-system/account/theme.properties | 2 + theme/nl-design-system/login/theme.properties | 2 + webpack.config.js | 13 ++++++ 13 files changed, 139 insertions(+) create mode 100644 .editorconfig create mode 100644 .github/CODEOWNERS create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/build.yaml create mode 100644 .gitignore create mode 100644 .nvmrc create mode 100755 META-INF/keycloak-themes.json create mode 100644 README.md create mode 100644 compose.yaml create mode 100644 package.json create mode 100644 theme/nl-design-system/account/theme.properties create mode 100644 theme/nl-design-system/login/theme.properties create mode 100644 webpack.config.js diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..0d98250 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +line_length = 120 +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..060d297 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @MinBZK/mijn-bureau diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..88618e9 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "monthly" + day: "monday" + time: "08:00" + timezone: "Europe/Amsterdam" + labels: + - "dependencies" + groups: + allnpm: + patterns: + - "*" diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..eaafcea --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,45 @@ +name: build + +on: + push: + branches: + - main + tags: + - "v*" + pull_request: + branches: + - "main" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: "npm" + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run compile + + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '21' + + - name: package template + run: npm run build + + - uses: actions/upload-artifact@v4 + with: + name: keycloak-nl-design-system.jar + path: output/keycloak-nl-design-system.jar + if-no-files-found: error + retention-days: 7 + overwrite: true diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a03e39e --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +downloads/ +output/ diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..80a9956 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v20.16.0 diff --git a/META-INF/keycloak-themes.json b/META-INF/keycloak-themes.json new file mode 100755 index 0000000..54c0bb4 --- /dev/null +++ b/META-INF/keycloak-themes.json @@ -0,0 +1,6 @@ +{ + "themes": [{ + "name" : "nl-design-system", + "types": [ "login", "account" ] + }] +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..a257772 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# Keycloak template | NL Design System + +We bouwen hier een keycloak template met het NL design system. + +## RVO Design system + +Momenteel gebruiken we het NL-Design system van het RVO omdat deze de meeste componenten bevat. Het NL design system is beschikbaar op [Github](https://github.com/nl-design-system/) + +Link naar de documentatie is hier te vinden: [ROOS](https://nl-design-system.github.io/rvo/docs/) \ No newline at end of file diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..860447b --- /dev/null +++ b/compose.yaml @@ -0,0 +1,11 @@ +services: + keycloak: + image: quay.io/keycloak/keycloak:25.0.1 + environment: + KEYCLOAK_ADMIN: admin + KEYCLOAK_ADMIN_PASSWORD: admin + ports: + - 8080:8080 + command: start-dev + volumes: + - ./theme/nl-design-system:/opt/keycloak/themes/nl-design-system \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..b1fabfa --- /dev/null +++ b/package.json @@ -0,0 +1,17 @@ +{ + "name": "keycloak-theme-nl-design-system", + "version": "1.0.0", + "description": "We bouwen hier een keycloak template met het NL design system.", + "scripts": { + "build": "jar --create --file output/keycloak-nl-design-system.jar theme/ META-INF/", + "compile": "webpack --config webpack.config.js" + }, + "author": "", + "devDependencies": { + "@nl-rvo/assets": "1.0.0-alpha.360", + "@nl-rvo/component-library-css": "4.0.0", + "@nl-rvo/design-tokens": "1.6.2", + "webpack": "^5.97.1", + "webpack-cli": "^6.0.1" + } +} diff --git a/theme/nl-design-system/account/theme.properties b/theme/nl-design-system/account/theme.properties new file mode 100644 index 0000000..e67231f --- /dev/null +++ b/theme/nl-design-system/account/theme.properties @@ -0,0 +1,2 @@ +parent=base +import=common/keycloak \ No newline at end of file diff --git a/theme/nl-design-system/login/theme.properties b/theme/nl-design-system/login/theme.properties new file mode 100644 index 0000000..e67231f --- /dev/null +++ b/theme/nl-design-system/login/theme.properties @@ -0,0 +1,2 @@ +parent=base +import=common/keycloak \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..2d79897 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,13 @@ +const path = require('path'); + +module.exports = { + mode: 'development', + entry: './template.js', + output: { + filename: 'template.js', + path: path.resolve(__dirname, 'theme/nl-design-system/login') + }, + devtool: 'source-map', + plugins: [ + ] +};