@ambita/design-system 5.0.12 → 5.1.1-1301.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 +60 -30
- package/dist/ds.js +2 -2
- package/dist/ds.js.map +1 -1
- package/dist/ds.mjs +13 -14
- package/dist/ds.mjs.map +1 -1
- package/dist/ds.umd.js +11 -11
- package/dist/ds.umd.js.map +1 -1
- package/dist/favicon.ico +0 -0
- package/dist/favicon.svg +9 -0
- package/dist/index.css +1 -1
- package/dist/types/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +19 -18
package/README.md
CHANGED
|
@@ -1,75 +1,105 @@
|
|
|
1
1
|
# Design System
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Written in Vue 3 using Vite and TypeScript.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Getting started
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### First run
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Generate NPM token (try the 'npm whoami' command to see if you get any response). If no response, complete the following guide: https://ambita.atlassian.net/wiki/spaces/AI/pages/3060006975/Generate+NPM_TOKEN
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
To get the project up and running locally, install npm packages and start vite:
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
```sh
|
|
14
|
+
npm i && npm run storybook
|
|
15
|
+
```
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
|
|
17
|
-
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
|
|
18
|
-
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
|
|
17
|
+
### [Vivid Blueprint](https://github.com/Ambita/vivid-blueprint)
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
We also have an optional front-end template which we highly recommend using for new Ambita front-end projects. It is based on the create-vue project and comes pre-installed with this design system along with other goodies.
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
### Contribution
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
New features must be developed on separate feature branches and merged into dev through pull requests. A GitHub workflow will then automatically publish a new npm package to @ambita/design-system.
|
|
24
|
+
It will have a dev tag and can be installed like this:
|
|
25
25
|
|
|
26
26
|
```sh
|
|
27
|
-
npm
|
|
27
|
+
npm i @ambita/design-system@dev
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
To be able to commit, the code must pass a lint-check and all unit tests must run successfully.
|
|
31
|
+
The code will be automatically formatted, but can also be run manually with a script shown below.
|
|
32
|
+
|
|
33
|
+
After testing the @dev package, a PR to main from dev can be created.
|
|
34
|
+
Post-merge, another workflow will be run, publishing a @latest package to npm which can be installed like this.
|
|
31
35
|
|
|
32
36
|
```sh
|
|
33
|
-
npm
|
|
37
|
+
npm i @ambita/design-system
|
|
34
38
|
```
|
|
35
39
|
|
|
36
|
-
|
|
40
|
+
#### New Components
|
|
41
|
+
|
|
42
|
+
Every new component and helper should have a storybook document associated with it and preferably unit tests as well. Remember to export it in `./src/index.ts`.
|
|
43
|
+
|
|
44
|
+
### Scripts
|
|
45
|
+
|
|
46
|
+
#### Compile and Hot-Reload for Development
|
|
37
47
|
|
|
38
48
|
```sh
|
|
39
|
-
npm
|
|
49
|
+
npm start
|
|
40
50
|
```
|
|
41
51
|
|
|
42
|
-
|
|
52
|
+
#### Documentation and manual testing with [Storybook](https://storybook.js.org/)
|
|
43
53
|
|
|
44
54
|
```sh
|
|
45
|
-
npm run
|
|
55
|
+
npm run storybook
|
|
46
56
|
```
|
|
47
57
|
|
|
48
|
-
|
|
58
|
+
#### Type-Check, Compile and Minify for Production
|
|
49
59
|
|
|
50
60
|
```sh
|
|
51
|
-
npm run
|
|
61
|
+
npm run build
|
|
52
62
|
```
|
|
53
63
|
|
|
54
|
-
|
|
55
|
-
It is much faster than the production build.
|
|
64
|
+
#### Run Unit Tests with [Vitest](https://vitest.dev/)
|
|
56
65
|
|
|
57
|
-
|
|
66
|
+
Once:
|
|
58
67
|
|
|
59
68
|
```sh
|
|
60
|
-
npm
|
|
61
|
-
npm run test:e2e
|
|
69
|
+
npm test
|
|
62
70
|
```
|
|
63
71
|
|
|
64
|
-
|
|
72
|
+
Continuously:
|
|
65
73
|
|
|
66
74
|
```sh
|
|
67
|
-
npm run
|
|
75
|
+
npm run test:unit
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
#### Test coverage with [v8](https://vitest.dev/guide/coverage)
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
npm run test:coverage
|
|
68
82
|
```
|
|
69
83
|
|
|
84
|
+
#### Lint with [ESLint](https://eslint.org/)
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
npm run lint
|
|
88
|
+
```
|
|
70
89
|
|
|
71
|
-
|
|
90
|
+
#### Format with [Prettier](https://prettier.io/)
|
|
72
91
|
|
|
73
92
|
```sh
|
|
74
93
|
npm run format
|
|
75
94
|
```
|
|
95
|
+
|
|
96
|
+
#### Type Check [TypeScript](https://www.typescriptlang.org/)
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
npm run type-check
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Links
|
|
103
|
+
|
|
104
|
+
- https://github.com/Ambita/vivid-blueprint
|
|
105
|
+
- https://github.com/Ambita/design-system-icons
|