1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-04-20 13:22:04 +02:00

update contributing docs

This commit is contained in:
Ian Storm Taylor 2019-11-27 20:57:55 -05:00
parent 4ff6972096
commit e766e7a4ac
2 changed files with 12 additions and 14 deletions

View File

@ -33,7 +33,7 @@ Please run through this checklist for your pull request:
- [ ] The new code matches the existing patterns and styles.
- [ ] The tests pass with `yarn test`.
- [ ] The linter passes with `yarn lint`. (Fix errors with `yarn fix`.)
- [ ] The relevant examples still work. (Run examples with `yarn watch`.)
- [ ] The relevant examples still work. (Run examples with `yarn start`.)
#### Does this fix any issues or need any specific reviewers?

View File

@ -40,10 +40,6 @@ Please include tests and docs with every pull request!
## Running Examples
Check out the [Examples readme](https://github.com/ianstormtaylor/slate/blob/master/examples/Readme.md) to see how to get the examples running locally!
## Running Tests
To run the tests, you need to have the Slate repository cloned to your computer. After that, you need to `cd` into the directory where you cloned it, and install the dependencies with `yarn` and build the monorepo:
```
@ -51,21 +47,23 @@ yarn install
yarn build
```
Then run the tests with:
Then you can start the examples server with:
```
yarn start
```
## Running Tests
Follow the examples running steps, and then run the tests with:
```
yarn test
```
To keep the source rebuilding on every file change, you need to run an additional watching command in a separate process:
If you need to debug something, you can add a `debugger` line to the source, and then run `yarn test:debug`.
```
yarn watch
```
If you need to debug something, you can add a `debugger` line to the source, and then run `yarn test debug`.
If you only want to run a specific test or tests, you can run `yarn test --fgrep="slate-react rendering"` flag which will filter the tests being run by grepping for the string in each test.
If you only want to run a specific test or tests, you can run `yarn test --fgrep="slate-react rendering"` flag which will filter the tests being run by grepping for the string in each test. (This is a Mocha flag that gets passed through.)
## Testing Input Methods