@ironsource/shared-ui 1.4.2 → 1.4.3-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -21
- package/index.vue.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
Shared UI - VUE3 components library
|
|
1
|
+
Shared UI - VUE3 components library
|
|
2
|
+
|
|
3
|
+
## Usage
|
|
2
4
|
|
|
3
|
-
## Usage
|
|
4
5
|
```
|
|
5
6
|
npm i @ironsource/shared-ui
|
|
6
7
|
```
|
|
8
|
+
|
|
7
9
|
Then import the component in your Vue app:
|
|
10
|
+
|
|
8
11
|
```
|
|
9
12
|
import Button from '@ironsource/shared-ui/button';
|
|
10
13
|
```
|
|
@@ -13,7 +16,8 @@ import Button from '@ironsource/shared-ui/button';
|
|
|
13
16
|
|
|
14
17
|
### Pre-release
|
|
15
18
|
|
|
16
|
-
To release a pre-release version, follow these steps:
|
|
19
|
+
To release a pre-release version, follow these steps:
|
|
20
|
+
|
|
17
21
|
1. Checkout to `release/x.x.x` branch
|
|
18
22
|
2. Create a new branch from `release/x.x.x` branch
|
|
19
23
|
3. Make your changes
|
|
@@ -26,39 +30,43 @@ Running `pre-release.yml` workflow will create a pre-release (-rc.xx) version an
|
|
|
26
30
|
### Release
|
|
27
31
|
|
|
28
32
|
To release a new version of the package (due to breaking changes), you need to follow the next steps:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
7. Add reviewers
|
|
36
|
-
8. Merge the PR to `release/x.x.x` branch
|
|
37
|
-
9. Create a new PR from `release/x.x.x` branch to `main` branch
|
|
38
|
-
10. When you changes will ready to the release, run `release.yml` workflow it will create a new last release version and publish it to npm
|
|
39
|
-
11. Merge the PR to `main` branch
|
|
33
|
+
|
|
34
|
+
1. Make sure you have checked your pre-release from `release/x.x.x` branch.
|
|
35
|
+
2. When you changes are ready to the release, run `release.yml` workflow it will create a new release version and publish it to npm.
|
|
36
|
+
3. Merge the PR to `main` branch and remove `release/x.x.x` branch.
|
|
37
|
+
4. Create new `release/x.x.x` from `main` branch again with the relevant major number.
|
|
38
|
+
5. From new `release/x.x.x` branch create a PR to `main` branch.
|
|
40
39
|
|
|
41
40
|
## Testing
|
|
41
|
+
|
|
42
42
|
Uses Vitest + Vue Test Utils (runs automatically on commit)
|
|
43
|
+
|
|
43
44
|
```
|
|
44
45
|
npm run test
|
|
45
46
|
```
|
|
47
|
+
|
|
46
48
|
run in watch mode:
|
|
49
|
+
|
|
47
50
|
```
|
|
48
51
|
npm run test:watch
|
|
49
52
|
```
|
|
53
|
+
|
|
50
54
|
run tests with coverage:
|
|
55
|
+
|
|
51
56
|
```
|
|
52
57
|
npm run test:coverage
|
|
53
58
|
```
|
|
54
59
|
|
|
55
60
|
## Component Development
|
|
61
|
+
|
|
56
62
|
Generate a new component (using Hygen):
|
|
63
|
+
|
|
57
64
|
```
|
|
58
65
|
npm run generate:component componentName
|
|
59
66
|
```
|
|
60
67
|
|
|
61
68
|
Start storybook:
|
|
69
|
+
|
|
62
70
|
```
|
|
63
71
|
npm run storybook
|
|
64
72
|
```
|
|
@@ -69,9 +77,10 @@ You can publish your branch to storybook by running "Deploy Docs" (`storybook.ym
|
|
|
69
77
|
It will build and publish your branch stories. That you can check by entering this URL:
|
|
70
78
|
https://mobile-shared-ui.ironsrc.mobi/branch_your-branch-name/
|
|
71
79
|
|
|
72
|
-
|
|
73
80
|
## Linking for local development in another project
|
|
81
|
+
|
|
74
82
|
When developing locally, you can link to the shared-ui library:
|
|
83
|
+
|
|
75
84
|
```
|
|
76
85
|
npm run build
|
|
77
86
|
cd ./dist
|
|
@@ -81,32 +90,38 @@ npm link @ironsource/shared-ui
|
|
|
81
90
|
```
|
|
82
91
|
|
|
83
92
|
Add an alias for the vue & @vueuse/core dependencies import in your vite/webpack config:
|
|
93
|
+
|
|
84
94
|
```
|
|
85
95
|
vue: path.resolve('./node_modules/vue/dist/vue.runtime.esm-browser.js'),
|
|
86
96
|
'@vueuse/core': path.resolve('./node_modules/@vueuse/core/index'),
|
|
87
97
|
```
|
|
98
|
+
|
|
88
99
|
You may also want to add the following alias for absoulte imports:
|
|
100
|
+
|
|
89
101
|
```
|
|
90
102
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
91
103
|
```
|
|
92
104
|
|
|
93
105
|
## Lint
|
|
106
|
+
|
|
94
107
|
Uses ESLint + Prettier rules (runs automatically on commit)
|
|
108
|
+
|
|
95
109
|
```
|
|
96
110
|
npm run lint
|
|
97
111
|
```
|
|
98
112
|
|
|
99
113
|
## Visual Tests
|
|
114
|
+
|
|
100
115
|
Uses jest, puppeteer and jest-image-snapshot packages
|
|
101
116
|
|
|
102
117
|
On CI process:
|
|
118
|
+
|
|
103
119
|
1. on every push the step-visual-test.yml workflow will be triggered
|
|
104
|
-
2. visual tests results will be saved on s3 bucket
|
|
105
|
-
3. the comparing will be against master->stable folder
|
|
106
|
-
4. unless there is a nested folder "stable" under a folder with the same branch name.
|
|
120
|
+
2. visual tests results will be saved on s3 bucket
|
|
121
|
+
3. the comparing will be against master->stable folder
|
|
122
|
+
4. unless there is a nested folder "stable" under a folder with the same branch name.
|
|
107
123
|
5. on failure a new folder with commit id will be created under the branch folder on s3
|
|
108
|
-
6. the failed tests will be under the "
|
|
124
|
+
6. the failed tests will be under the "**diff_output**" nested folder
|
|
109
125
|
7. if changes are required, manually trigger the workflow with update input as true
|
|
110
126
|
8. a new folder named "stable" will be created under the branch name folder on s3
|
|
111
|
-
9. on merge to master branch folder will be copy to master.
|
|
112
|
-
|
|
127
|
+
9. on merge to master branch folder will be copy to master.
|
package/index.vue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './PercentageInput.vue_vue_type_style_index_0_scoped_true_lang.css';
|
|
2
2
|
export { AppTriggerTypes } from './components/appTrigger/index.vue.js';
|
|
3
3
|
export { AutocompleteDropdownTypes } from './components/autocompleteDropdown/index.vue.js';
|
|
4
4
|
export { MenuItemTypes } from './components/menuItem/index.vue.js';
|