Skip to content

Commit 5c24274

Browse files
committed
added workflow; fixed eslint; added license, copyrights and readme
1 parent 1716b5a commit 5c24274

File tree

12 files changed

+2419
-11
lines changed

12 files changed

+2419
-11
lines changed

.github/workflows/frontend-ci.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Frontend tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- '[0-9]+.[0-9]+'
8+
pull_request: ~
9+
10+
jobs:
11+
storybook-tests:
12+
name: Storybook tests
13+
runs-on: 'ubuntu-24.04'
14+
timeout-minutes: 5
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: '18'
21+
- run: yarn install
22+
- run: yarn storybook:test
23+
assets-tests:
24+
name: Assets tests
25+
runs-on: 'ubuntu-24.04'
26+
timeout-minutes: 5
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
- uses: actions/setup-node@v4
31+
with:
32+
node-version: '18'
33+
- run: yarn install
34+
- run: yarn assets:test
35+
components-tests:
36+
name: Components tests
37+
runs-on: 'ubuntu-24.04'
38+
timeout-minutes: 5
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: actions/setup-node@v4
43+
with:
44+
node-version: '18'
45+
- run: yarn install
46+
- run: yarn components:test

.github/workflows/pr-check.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: PR check
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
- synchronize
7+
- reopened
8+
- edited
9+
10+
jobs:
11+
test-base-branch:
12+
uses: ibexa/gh-workflows/.github/workflows/pr-check.yml@main

.github/workflows/reviewers.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: On PR Review Requested
2+
3+
on:
4+
pull_request:
5+
types: [review_requested]
6+
7+
jobs:
8+
call-expand-team-reviewers:
9+
if: ${{ github.event.requested_team }}
10+
uses: ibexa/gh-workflows/.github/workflows/expand-team-reviewers.yml@main
11+
with:
12+
requested_team: ${{ github.event.requested_team.slug }}
13+
pull_request_number: ${{ github.event.pull_request.number }}
14+
repository: ${{ github.repository }}
15+
secrets: inherit

COPYRIGHT

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Copyright (C) 1999-2025 Ibexa AS (formerly eZ Systems AS). All rights reserved.
2+
3+
This source code is available separately under the following licenses:
4+
5+
A - Ibexa Business Use License Agreement (Ibexa BUL),
6+
version 2.4 or later versions (as license terms may be updated from time to time)
7+
Ibexa BUL is granted by having a valid Ibexa DXP (formerly eZ Platform Enterprise) subscription,
8+
as described at: https://www.ibexa.co/product
9+
For the full Ibexa BUL license text, please see:
10+
- LICENSE-bul file placed in the root of this source code, or
11+
- https://www.ibexa.co/software-information/licenses-and-agreements (latest version applies)
12+
13+
AND
14+
15+
B - GNU General Public License, version 2
16+
Grants an copyleft open source license with ABSOLUTELY NO WARRANTY. For the full GPL license text, please see:
17+
- LICENSE file placed in the root of this source code, or
18+
- https://www.gnu.org/licenses/old-licenses/gpl-2.0.html

LICENSE

Lines changed: 360 additions & 0 deletions
Large diffs are not rendered by default.

LICENSE-bul

Lines changed: 1890 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Ibexa Design System
2+
3+
## Using dev version in Ibexa DXP
4+
5+
### Change aliases for TS configuration
6+
In Ibexa DXP root directory edit `ibexa.tsconfig.json` and add two routes in TS config:
7+
```
8+
"paths": {
9+
"@ids-assets/*": [
10+
"[path to Ibexa Design System directory]/packages/assets/src/*"
11+
],
12+
"@ids-components/*": [
13+
"[path to Ibexa Design System directory]/packages/components/src/*"
14+
]
15+
}
16+
```
17+
This will overwrite default TS aliases pointing to modules inside `ibexa/admin-ui-assets` bundle.
18+
19+
### Change aliases for webpack
20+
In Ibexa DXP root directory edit `ibexa.webpack.config.js` and add import:
21+
```
22+
const createDevAliases = require('../bundles/design-system/scripts/symfony/create-dev-aliases.cjs');
23+
```
24+
and then add
25+
```
26+
createDevAliases(Encore);
27+
```
28+
after
29+
```
30+
configSetups.forEach((configSetupPath) => {
31+
const setupConfig = require(configSetupPath);
32+
33+
setupConfig(Encore);
34+
});
35+
```
36+
This will overwrite default webpack aliases defined in `ibexa/admin-ui-assets` bundle with paths pointing to this module packages.
37+
38+
## Preparing tag for release
39+
40+
To prepare a tag for release you have to run the following command from the root directory of the module:
41+
42+
```
43+
sh bin/prepare_release.sh -v 1.0.0 -b main
44+
```
45+
46+
Options:
47+
1. -v : tag to be released
48+
1. -b : branch used to create the tag
49+
50+
## COPYRIGHT
51+
52+
Copyright (C) 1999-2025 Ibexa AS (formerly eZ Systems AS). All rights reserved.
53+
54+
## LICENSE
55+
56+
This source code is available separately under the following licenses:
57+
58+
A - Ibexa Business Use License Agreement (Ibexa BUL),
59+
version 2.4 or later versions (as license terms may be updated from time to time)
60+
Ibexa BUL is granted by having a valid Ibexa DXP (formerly eZ Platform Enterprise) subscription,
61+
as described at: https://www.ibexa.co/product
62+
For the full Ibexa BUL license text, please see:
63+
https://www.ibexa.co/software-information/licenses-and-agreements (latest version applies)
64+
65+
AND
66+
67+
B - GNU General Public License, version 2
68+
Grants an copyleft open source license with ABSOLUTELY NO WARRANTY. For the full GPL license text, please see:
69+
https://www.gnu.org/licenses/old-licenses/gpl-2.0.html

packages/components/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
"cross-env": "^7.0.3"
88
},
99
"scripts": {
10-
"prettier:test": "yarn prettier \"./src/**/*.{js,ts,jsx,tsx}\" --check",
10+
"prettier:test": "yarn prettier \"./scripts/*.js\" \"./src/**/*.{js,ts,jsx,tsx}\" --check",
1111
"prettier:fix": "yarn prettier:test --write",
12-
"eslint:test": "yarn eslint \"./src/**/*.{js,ts,jsx,tsx}\"",
12+
"eslint:test": "yarn eslint \"./scripts/*.js\" \"./src/**/*.{js,ts,jsx,tsx}\"",
1313
"eslint:fix": "yarn eslint:test --fix",
1414
"ts:test": "yarn tsc --noEmit",
1515
"test": "yarn prettier:test && yarn eslint:test && yarn ts:test",

packages/components/scripts/extract_translations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,5 @@ files.forEach((filepath) => {
6565
jsToXliff12(translations).then((xliffFileContent) => {
6666
fs.writeFileSync('./assets/translations.xliff', xliffFileContent, 'utf-8');
6767

68-
console.log('Updated translations.');
68+
console.log('Updated translations.'); // eslint-disable-line no-console
6969
});

packages/components/scripts/generate_exports.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,14 @@ componentsPaths
1818
packageJsonExports[`./${name}`] = `./dist/${name}/index.js`;
1919
});
2020

21-
contextComponentsPaths
22-
.forEach((name) => {
23-
packageJsonExports[`./context/${name}`] = `./dist/context/${name}/index.js`;
24-
});
25-
21+
contextComponentsPaths.forEach((name) => {
22+
packageJsonExports[`./context/${name}`] = `./dist/context/${name}/index.js`;
23+
});
2624

2725
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
2826

2927
packageJson.exports = packageJsonExports;
3028

3129
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
3230

33-
console.log('Updated package.json with exports field.');
31+
console.log('Updated package.json with exports field.'); // eslint-disable-line no-console

0 commit comments

Comments
 (0)