From e766e7a4ac6dbdd2863a73012140d79ebe42743e Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Wed, 27 Nov 2019 20:57:55 -0500 Subject: [PATCH] update contributing docs --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- Contributing.md | 24 +++++++++++------------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index da94706b5..faa69a444 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -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? diff --git a/Contributing.md b/Contributing.md index 113232896..bb446e606 100644 --- a/Contributing.md +++ b/Contributing.md @@ -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