forked from scalar/scalar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CONTRIBUTING
59 lines (41 loc) · 2.87 KB
/
CONTRIBUTING
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
52
53
54
55
56
57
58
59
# Contributing
Contributions are welcome. We’re using [pnpm](https://pnpm.io/).
## Development setup
1. Clone the repository: `$ git clone [email protected]:scalar/scalar.git`
2. Install all dependencies: `$ pnpm install`
3. Build all packages once: `$ pnpm turbo build`
4. Run the development server: `$ pnpm run dev`
5. Open your browser: <http://localhost:5050>
This should give you a nice start page with entrypoints to the various previews and examples.
## Tests
Most packages have a bunch of tests, mostly for all the helper functions we use.
It’s worth to check the tests locally before sending contributions: `$ pnpm test`
If you want to add a test and only run your test file, you can filter the test suite like this: `$ pnpm test your-test`
### Testing the CLI
If you want to run the tests for the CLI, you’ll need to package first. The tests don’t use the source files, but the dist files.
To just run the CLI from the source files, you can use the following alias:
`$ pnpm @scalar/cli --version`
## PRs
Don’t worry, we’ll help you to get your PR in. But here is how you can help us:
### Semantic PR titles
We require a semantic PR title, here is an example:
```
docs: Add information about semantic commits
^ ^
| |__ Subject
|________ Prefix
```
Here are all the prefixes you need to know:
| Prefix | Description |
| -------- | ----------------------------------------------------------------------------------------------------------- |
| feat | A new feature |
| fix | A bug fix |
| docs | Documentation only changes |
| style | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) |
| refactor | A code change that neither fixes a bug nor adds a feature |
| perf | A code change that improves performance |
| test | Adding missing tests or correcting existing tests |
| build | Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) |
| ci | Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) |
| chore | Other changes that don't modify src or test files |
| revert | Reverts a previous commit |