Skip to content

Commit 913aa12

Browse files
authored
Merge branch 'main' into fix-input-defaultvalue
2 parents c95cb58 + 3627dbc commit 913aa12

File tree

104 files changed

+17276
-5013
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+17276
-5013
lines changed

.eslintrc.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/scripts/build-gh-page.sh

Lines changed: 26 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,43 @@
11
#!/usr/bin/env bash
22

33
if [[ $NAME == "true" ]]; then
4-
echo "Erro: Missing NAME variable"
5-
exit 1
6-
fi
7-
8-
echo "➕ Create temp or public dir: $NAME"
9-
if [[ $RELEASE == "true" ]]; then
10-
mkdir temp
11-
echo " Created 'temp' dir"
12-
else
13-
mkdir public
14-
echo " Created 'public' dir"
4+
echo "Erro: Missing NAME variable"
5+
exit 1
156
fi
167

8+
echo "➕ Create public dir"
9+
mkdir public
1710

1811
echo "📥 Get gh-pages tar"
1912
curl -L https://github.com/"$OWNER_NAME"/"$REPO_NAME"/tarball/gh-pages --output gh-pages
2013

2114
echo "📦 Unpack Tar"
22-
if [[ $RELEASE == "true" ]]; then
23-
tar -zxf gh-pages -C temp --strip-components 1
24-
else
25-
tar -zxf gh-pages -C public --strip-components 1
26-
fi
15+
tar -zxf gh-pages -C public --strip-components 1
2716

28-
echo "📁 Bundle public"
2917
if [[ $RELEASE == "true" ]]; then
30-
echo " Move ./out ./public"
31-
mv ./out ./public
32-
cp -R ./public out
33-
if [ -d ./temp/review ]; then
34-
echo " Move ./temp/review ./public"
35-
mv ./temp/review ./public
36-
fi
37-
if [ -d ./temp/version ]; then
38-
echo " Move ./temp/version ./public"
39-
mv ./temp/version ./public
40-
fi
18+
echo "🔃 Change redirect"
19+
echo "<meta http-equiv=\"refresh\" content=\"0; URL=https://"$OWNER_NAME".github.io/"$REPO_NAME"/version/"$NAME"\" />" >public/index.html
4120
fi
4221

22+
echo "👣 Move out dir"
4323
if [[ $PRE_RELEASE == "true" || $RELEASE == "true" ]]; then
44-
if [[ ! -d ./public/version ]]; then
45-
echo " Make dir ./public/version"
46-
mkdir ./public/version
47-
fi
48-
if [[ -d ./public/version/"$NAME" ]]; then
49-
echo " Remove dir ./public/version/$NAME"
50-
rm -rf ./public/version/"$NAME"
51-
fi
52-
mv ./out ./public/version/"$NAME"
24+
if [[ ! -d ./public/version ]]; then
25+
echo " Make dir ./public/version"
26+
mkdir ./public/version
27+
fi
28+
if [[ -d ./public/version/"$NAME" ]]; then
29+
echo " Remove dir ./public/version/$NAME"
30+
rm -rf ./public/version/"$NAME"
31+
fi
32+
mv ./out ./public/version/"$NAME"
5333
else
54-
if [[ ! -d ./public/review ]]; then
55-
echo " Make dir ./public/review"
56-
mkdir ./public/review
57-
fi
58-
if [[ -d ./public/review/"$NAME" ]]; then
59-
echo " Remove dir ./public/review/$NAME"
60-
rm -rf ./public/review/"$NAME"
61-
fi
62-
mv ./out ./public/review/"$NAME"
34+
if [[ ! -d ./public/review ]]; then
35+
echo " Make dir ./public/review"
36+
mkdir ./public/review
37+
fi
38+
if [[ -d ./public/review/"$NAME" ]]; then
39+
echo " Remove dir ./public/review/$NAME"
40+
rm -rf ./public/review/"$NAME"
41+
fi
42+
mv ./out ./public/review/"$NAME"
6343
fi

.github/scripts/publish-npm.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ echo "goto build-outputs"
1717
cd build-outputs || exit 1
1818

1919
# TODO: Add other build as well
20-
for PACKAGE in 'foundations' 'components' 'ngx-components' 'react-components' 'v-components'; do
20+
for PACKAGE in 'eslint-plugin' 'foundations' 'components' 'ngx-components' 'react-components' 'v-components'; do
2121
echo "Start $PACKAGE bundle:"
2222

2323
echo "🆚 Update Version"
2424
npm version --no-git-tag-version "$VALID_SEMVER_VERSION" --workspace=@db-ui/"$PACKAGE"
2525

26-
if [[ $PACKAGE != 'foundations' ]]; then
26+
if [[ $PACKAGE != 'foundations' && $PACKAGE != 'eslint-plugin' ]]; then
2727
echo "🕵️‍ Set foundations dependency"
2828
npm pkg set dependencies.@db-ui/foundations="$VALID_SEMVER_VERSION" --workspace=@db-ui/"$PACKAGE"
2929
if [[ $PACKAGE != 'components' ]]; then
@@ -58,7 +58,7 @@ for REGISTRY in 'GITHUB' 'NPM'; do
5858
fi
5959

6060
# TODO: Add other build as well
61-
for PACKAGE in 'foundations' 'components' 'ngx-components' 'react-components' 'v-components'; do
61+
for PACKAGE in 'eslint-plugin' 'foundations' 'components' 'ngx-components' 'react-components' 'v-components'; do
6262
echo "⤴ Publish $PACKAGE with tag $TAG to $REGISTRY"
6363
npm publish --tag "$TAG" db-ui-"$PACKAGE"-"$VALID_SEMVER_VERSION".tgz
6464
done

.github/workflows/01-build-showcases.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ name: Build Showcases
33

44
on:
55
workflow_call:
6+
inputs:
7+
release:
8+
required: false
9+
default: "false"
10+
type: string
11+
preRelease:
12+
required: false
13+
default: "false"
14+
type: string
615

716
jobs:
817
build-showcases:
@@ -27,8 +36,34 @@ jobs:
2736
name: db-ui-output
2837
path: output
2938

39+
- name: ↔ Extract branch name
40+
uses: ./.github/actions/extract-branch
41+
id: extract_branch
42+
43+
- name: 🛤 Get base path
44+
uses: actions/github-script@v6
45+
env:
46+
NAME: ${{ steps.extract_branch.outputs.branch-name }}
47+
RELEASE: ${{ inputs.release }}
48+
PRE_RELEASE: ${{ inputs.preRelease }}
49+
id: base-path
50+
with:
51+
result-encoding: string
52+
script: |
53+
var path = 'review';
54+
if(process.env.RELEASE === "true" || process.env.PRE_RELEASE === "true") {
55+
path = 'version'
56+
}
57+
return `/${context?.payload?.repository?.name}/${path}/${process.env.NAME}`
58+
3059
- name: 🔨 Build Showcases
31-
run: npm run build-showcases
60+
env:
61+
NEXT_PUBLIC_BASE_PATH: ${{ steps.base-path.outputs.result }}
62+
BASE_URL: ${{ steps.base-path.outputs.result }}
63+
run: |
64+
npx replace-in-file /angular-current-showcase/ ${BASE_URL}/angular-current-showcase/ showcases/angular-current-showcase/src/index.html
65+
npx replace-in-file /angular-lts-showcase/ ${BASE_URL}/angular-lts-showcase/ showcases/angular-lts-showcase/src/index.html
66+
npm run build-showcases
3267
3368
- name: ⬆ Upload Showcases
3469
uses: ./.github/actions/upload-tar-artifact

.github/workflows/03-deploy-gh-pages.yml

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -24,52 +24,40 @@ jobs:
2424
- name: 🔄 Init Cache
2525
uses: ./.github/actions/npm-cache
2626

27-
- name: ⬇ Download build
27+
- name: ⬇ Download showcases
2828
uses: ./.github/actions/download-tar-artifact
2929
with:
30-
name: build
31-
path: out
30+
name: db-ui-showcases
31+
path: build-showcases
32+
33+
- name: 🦵🦿 I like to move it move it
34+
shell: bash
35+
run: |
36+
mv build-showcases/angular-current-showcase build-showcases/patternhub/angular-current-showcase
37+
mv build-showcases/angular-lts-showcase build-showcases/patternhub/angular-lts-showcase
38+
mv build-showcases/reactwind-showcase build-showcases/patternhub/reactwind-showcase
39+
mv build-showcases/react-showcase build-showcases/patternhub/react-showcase
40+
mv build-showcases/vue-showcase build-showcases/patternhub/vue-showcase
41+
mv build-showcases/patternhub out
3242
3343
- name: ↔ Extract branch name
3444
uses: ./.github/actions/extract-branch
3545
id: extract_branch
3646

37-
- name: ↔ Extract branch/tag name
38-
shell: bash
39-
env:
40-
RELEASE: ${{ inputs.release }}
41-
PRE_RELEASE: ${{ inputs.preRelease }}
42-
BRANCH_NAME: ${{ steps.extract_branch.outputs.branch-name }}
43-
run: |
44-
if [[ $RELEASE == "true" || $PRE_RELEASE == "true" ]]
45-
then
46-
echo "name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
47-
else
48-
echo "name=${$BRANCH_NAME}" >> $GITHUB_OUTPUT
49-
fi
50-
id: extract
51-
5247
- name: 📛 Get repo name
5348
uses: actions/github-script@v6
5449
id: repo-name
5550
with:
5651
result-encoding: string
5752
script: return context?.payload?.repository?.name
5853

59-
- name: 🎩 Get owner name
60-
uses: actions/github-script@v6
61-
id: owner-name
62-
with:
63-
result-encoding: string
64-
script: return context?.payload?.repository?.owner?.login
65-
6654
- name: 🔨 Build page
6755
env:
6856
RELEASE: ${{ inputs.release }}
6957
PRE_RELEASE: ${{ inputs.preRelease }}
70-
NAME: ${{ steps.extract.outputs.name }}
58+
NAME: ${{ steps.extract_branch.outputs.branch-name }}
7159
REPO_NAME: ${{ steps.repo-name.outputs.result }}
72-
OWNER_NAME: ${{ steps.owner-name.outputs.result }}
60+
OWNER_NAME: ${{ github.repository_owner }}
7361
run: |
7462
chmod +rx ./.github/scripts/build-gh-page.sh
7563
./.github/scripts/build-gh-page.sh
@@ -84,9 +72,9 @@ jobs:
8472
env:
8573
RELEASE: ${{ inputs.release }}
8674
PRE_RELEASE: ${{ inputs.preRelease }}
87-
NAME: ${{ steps.extract.outputs.name }}
75+
NAME: ${{ steps.extract_branch.outputs.branch-name }}
8876
REPO_NAME: ${{ steps.repo-name.outputs.result }}
89-
OWNER_NAME: ${{ steps.owner-name.outputs.result }}
77+
OWNER_NAME: ${{ github.repository_owner }}
9078
run: |
9179
if [[ $RELEASE == "true" ]];
9280
then

.github/workflows/default.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ jobs:
4141
run: echo "🎉 All tests were successful."
4242
# needs: [cypress]
4343
needs: [build-showcases]
44-
# deploy:
45-
# uses: ./.github/workflows/03-deploy-gh-pages.yml
46-
# needs: [cypress, get-publish-version]
47-
# with:
48-
# release: ${{ needs.get-publish-version.outputs.release }}
49-
# preRelease: ${{ needs.get-publish-version.outputs.preRelease }}
44+
45+
deploy:
46+
uses: ./.github/workflows/03-deploy-gh-pages.yml
47+
needs: [checks-done]
48+
with:
49+
release: false
50+
preRelease: false

.github/workflows/release.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
uses: ./.github/workflows/01-build-outputs.yml
2626
needs: [build-packages]
2727

28-
# build-showcases:
29-
# uses: ./.github/workflows/01-build-showcases.yml
30-
# needs: [build-packages]
28+
build-showcases:
29+
uses: ./.github/workflows/01-build-showcases.yml
30+
needs: [build-packages]
3131

3232
# cypress:
3333
# uses: ./.github/workflows/02-cypress.yml
@@ -41,16 +41,14 @@ jobs:
4141
# TODO: integrate the cypress builds and use the following two lines afterwards
4242
# run: echo "🎉 All tests were successful."
4343
# needs: [cypress]
44-
needs: [build-outputs]
45-
46-
# deploy:
47-
# uses: ./.github/workflows/03-deploy-gh-pages.yml
48-
# needs: [checks-done, get-publish-version]
49-
# with:
50-
# release: ${{ needs.get-publish-version.outputs.release }}
51-
# preRelease: ${{ needs.get-publish-version.outputs.preRelease }}
44+
needs: [build-outputs, build-showcases]
5245

53-
# needs: [checks-done, get-publish-version, build-outputs]
46+
deploy:
47+
uses: ./.github/workflows/03-deploy-gh-pages.yml
48+
needs: [checks-done, get-publish-version]
49+
with:
50+
release: ${{ needs.get-publish-version.outputs.release }}
51+
preRelease: ${{ needs.get-publish-version.outputs.preRelease }}
5452

5553
build-power-apps:
5654
uses: ./.github/workflows/01-build-power-apps.yml

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ npm-debug.log
66
**/build/
77
**/dist/
88
build-old/
9-
public/
109
out/
1110
dependencyGraph.json
1211
source/_meta/_head.mustache

.stylelintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ build-outputs/
44
out/
55
output/
66
source/_patterns/**
7+
showcases/patternhub/**

.stylelintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"declaration-property-value-disallowed-list": null,
1818
"scss/percent-placeholder-pattern": null,
1919
"scss/at-mixin-pattern": null,
20-
"scss/at-import-partial-extension": null
20+
"scss/at-import-partial-extension": null,
21+
"selector-max-id": null
2122
}
2223
}

0 commit comments

Comments
 (0)