You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 20, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+40-17Lines changed: 40 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,32 +25,55 @@ yarn dev
25
25
```
26
26
27
27
## Development Guide
28
-
### 1. Creating new components
29
-
Chakra UI Vue uses [hygen](https://www.hygen.io/) to generate new components. The component templates can be found in the `_templates/generator/component` directory
28
+
### Major todos:
29
+
-[ ] Documentation (to be based on Nuxt 3)
30
+
-[ ] Accessibility JS hooks (Documented in Roadmap)
Chakra UI Vue uses [hygen](https://www.hygen.io/) to generate new components. The component templates can be found in the `_templates/generator/component` directory.
34
+
35
+
* Run the hygen command to generate your new component.
This creates a new package with the name `<COMPONENT_NAME>` with some basic sanity tests.
40
+
41
+
* Run `yarn workspace @chakra-ui/COMPONENT_NAME build && yarn bootstrap` to build and link your component in the monorepo.
42
+
43
+
* Add the script for your package workspace in the global `package.json` file. `"COMPONENT_NAME": "yarn workspace @chakra-ui/COMPONENT_NAME",` goes under `scripts`.
44
+
45
+
* Before you can play around with your new component in the playground you will have to export your component from the `@chakra-ui/vue-next` package in the `core` directory under `packages`.
46
+
47
+
* Inside the `index.ts` file, you will have to add `export * from '@chakra-ui/COMPONENT_NAME'`.
34
48
35
-
This creates a new package with the name `<COMPONENT_NAME>` with some basic sanity tests.
49
+
* Your component also needs to be added as a dependency inside the `package.json` of the `@chakra-ui/vue-next` package as following:
50
+
```jsx
51
+
"dependencies": {
52
+
...
53
+
"@chakra-ui/COMPONENT_NAME":"*",
54
+
...
55
+
}
56
+
```
36
57
37
-
After creating your new package, run `yarn workspace @chakra-ui/COMPONENT_NAME && yarn bootstrap` to build and link your component in the monorepo.
58
+
* Run `yarn core build` and then `yarn dev` to view your newcomponentin the playground.
38
59
39
-
Run `yarn dev`to view your new component in the playground.
60
+
* When you make changes to your component, you will need to rebuild your package to have the changes applied infor example the playground`yarn workspace @chakra-ui/COMPONENT_NAME build` or `yarn COMPONENT_NAME build`. Alternatively, you can use the watch command. `yarn workspace @chakra-ui/COMPONENT_NAME watch` or `yarn COMPONENT_NAME watch`.
40
61
41
62
**Additional notes:**
42
63
Add a script for your package workspace in the `package.json` file.
43
64
44
-
### Major todos:
45
-
-[ ] Documentation (to be based on Nuxt 3)
46
-
-[ ] Accessibility JS hooks (Documented in Roadmap)
47
-
65
+
### Creating a newcommit message
66
+
The commits follow the [conventional commit format](https://www.conventionalcommits.org/). Husky is setup to lint your commit messages to match this format.
67
+
```bash
68
+
type(scope?): subject #scope is optional; multiple scopes are supported (current delimiter options: "/", "\" and ",")
69
+
```
48
70
49
-
#### Contributors' note:
50
-
Hi!
71
+
For example:
51
72
52
-
I'm excited to finally get this project out in the open. I love working on Chakra! Of recent, between my startup(mid-pivot), school, ministry, and family, I have a limited amount of time every day, so I may not be very active online on Twitter/Discord/Github to respond to issues very actively. The reason for this is that I find that I'm most productive when I have less presence on social media(I need it to deliver my best work <3). Notwithstanding, I indeed am oft pleasantly surprised when I do see the help and support from the community and different contributors! Thank you!
73
+
```bash
74
+
git commit -m "feat(component): create x component"
53
75
54
-
I have the entire Chakra UI core team members and Vue community to thank for their support, and for every contributor who does so by opening issues, writing tests and fixing bugs. I'm generally reachable by email at `[email protected]` or on `@codebender828` on Twitter and on the Chakra UI Discord.
76
+
git commit -m "chore: update x dependencies"
77
+
```
55
78
56
-
For now I'll be hacking away at this! Blessings!
79
+
For more information visit: [github.com/conventional-changelog/commitlint/#what-is-commitlint](https://github.com/conventional-changelog/commitlint/#what-is-commitlint)
0 commit comments