Skip to content

Commit 6fa52c1

Browse files
committed
Update CONTRIBUTING.md
1 parent 936af2a commit 6fa52c1

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

CONTRIBUTING.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ Plotly.plot(Tabs.fresh(), [{x:[1,2,3], y:[2,1,2]}]);
5252
script is run automatically on `npm install`.
5353
- `npm run watch`: starts a watchify file watcher just like the test dashboard but
5454
without booting up a server.
55-
- `npm run lint`: runs jshint on all source files
5655

5756
### Testing
5857

@@ -71,13 +70,33 @@ Image pixel comparison tests are run in a docker container. For more
7170
information on how to run them locally, please refer to [image test
7271
README](https://github.com/plotly/plotly.js/blob/master/test/image/README.md).
7372

73+
Running the test locally outputs the generated png images in `build/test_images/` and the png diffs in `build/test_images_diff/` (two git-ignored directories).
74+
75+
To view the image pixel comparison test results, run
76+
77+
```
78+
npm run start-image_viewer
79+
```
80+
which shows the baseline image, the generated image, the diff and the json mocks of test cases that failed.
81+
82+
To view the results of a run on CircleCI, download the `build/test_images/` and `build/test_images_diff/` artifacts into your local repo and then run `npm run start-image_viewer`.
83+
7484

7585
### Repo organization
7686

87+
- Distributed files are in `dist/`
88+
- Sources files are in `src/`, including the index.
89+
- Build and repo management scripts are in `./tasks/`
90+
- All tasks can be run using [`npm run-srcript`](https://docs.npmjs.com/cli/run-script)
91+
- Tests are `test/`, they are partitioned into `image` and `jasmine` tests
92+
- Test dashboard and image viewer code is in `devtools/`
93+
- Non-distributed, git-ignored built files are in `build/`
7794

7895

7996
### Coding style
8097

8198
- 4-space indentation
8299
- semi-colons are required
83100
- trailing commas
101+
102+
Check if ok, with `npm run lint`

0 commit comments

Comments
 (0)