Update the contributing guide for Docusaurus (#7327)

This commit is contained in:
Ben McCann 2020-05-08 08:09:37 -07:00 committed by GitHub
parent 8afa990e4c
commit 00f726b0ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,12 +39,20 @@ The following commands are now available from the repository root:
> gulp lint // perform code linting (ESLint)
> gulp test // perform code linting and run unit tests
> gulp test --browsers ... // test with specified browsers (comma-separated)
> gulp docs // build the documentation in ./dist/docs
> gulp docs --watch // starts the gitbook live reloaded server
```
More information can be found in [gulpfile.js](https://github.com/chartjs/Chart.js/blob/master/gulpfile.js).
### Documentation
We use [Docusaurus v2](https://v2.docusaurus.io/docs/introduction) to manage the docs which are contained as Markdown files in the docs directory. You can run the doc server locally using the commands provided by Docusaurus:
```
$ cd docs
$ npm install
$ npm run start
```
### Image-Based Tests
Some display-related functionality is difficult to test via typical Jasmine units. For this reason, we introduced image-based tests ([#3988](https://github.com/chartjs/Chart.js/pull/3988) and [#5777](https://github.com/chartjs/Chart.js/pull/5777)) to assert that a chart is drawn pixel-for-pixel matching an expected image.