Skip to content

Commit 1ca560c

Browse files
committed
add docs for the matestack:core:component generator
1 parent 7b50831 commit 1ca560c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/contribute/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,29 @@ Feel free to take a look at other examples and copy their structure!
2222
Note: We will not approve pull requests that introduce new concepts or components without documentation. Same goes for existing concepts & components.
2323
If you change the behavior of an existing part of this project, make sure to also update the corresponding part of the documentation!
2424

25+
## Core Components
26+
27+
Core Components are an essential part of the `matestack-ui-core` gem.
28+
If you are planning to contribute to Matestack you can start doing that by creating a core component. To help you getting started you can use the Core Component Generator.
29+
30+
The generator will create a matestack core component to `app/concepts/matestack/ui/core`.
31+
32+
Example:
33+
34+
```bash
35+
rails generate matestack:core:component div
36+
```
37+
38+
This will create a component for the HTML `<div>` tag and will generate the following files:
39+
40+
```bash
41+
app/concepts/matestack/ui/core/div/div.haml
42+
app/concepts/matestack/ui/core/div/div.rb
43+
spec/usage/components/div_spec.rb
44+
docs/components/div.md
45+
```
46+
47+
2548
## Tests
2649

2750
To assure this project is and remains in great condition, we heavily rely on automated tests. Tests are defined in `/spec` folder and can be executed by running:

0 commit comments

Comments
 (0)