-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCONTRIBUTING
More file actions
51 lines (38 loc) · 1.71 KB
/
CONTRIBUTING
File metadata and controls
51 lines (38 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# How to contribute
Hi, we're glad you want to help this project grow. If you need help with anything,
feel free to open an issue or discussion topic.
## Set up your dev environment
You'll need the following software installed:
- [Node.js](https://nodejs.org/en/) (v18 or higher)
- [pnpm](https://pnpm.io/)
- [git](https://git-scm.com/)
- Some IDE with TypeScript support (e.g. [VS Code](https://code.visualstudio.com/))
Then, follow these steps:
1. Clone the repository: `git clone https://github.com/jls-digital/cem-plugin-complex-types.git`
2. Run `pnpm install`
3. In a st§orybook project, add `"cem-plugin-complex-types": "link:<path_to_cloned_repo>",` to the `dependencies` in `package.json`
4. Run `pnpm install` in the storybook project
5. Enable the addon in `custom-elements-manifest.config.mjs` (see example below)
```ts
// custom-elements-manifest.config.mjs
export default {
// ...
plugins: [
// ...
cemPluginComplexTypes(['./src/**/*.ts']),
],
};
```
## Submitting a pull request
Create a new branch or a fork from the main branch and make your changes. Then
open a pull request with a description of your changes and thoughts behind them.
## Coding conventions
Coding conventions should be enforced by eslint and prettier. You can run the
linter with `pnpm check:lint` and the formatter with `pnpm check:format`. Autofixable errors
can be fixed across all files with `pnpm check:lint:fix` or `pnpm check:format:fix` respectively.
## Ideas for future features
- Support all languages from prism/hljs. Storybook's syntax highlighter only uses
a limited set of languages.
- Automatic import of source code files
- Ctrl + click to jump to reference (e.g. in Interface)
- Button to open code (local file) in editor