Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d4efd4e

Browse filesBrowse files
committed
update CONTRIBUTING and image-test README
1 parent d63390a commit d4efd4e
Copy full SHA for d4efd4e

File tree

2 files changed

+31
-26
lines changed
Filter options

2 files changed

+31
-26
lines changed

‎CONTRIBUTING.md

Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+25-21Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,47 +22,51 @@ cd plotly.js
2222
npm install
2323
```
2424

25-
**Step 2** Build plotly.js
25+
**Step 2** Start the test dashboard
2626

2727
```
28-
npm run build
28+
npm run start-test_dashboard
2929
```
3030

31-
The build script combines:
31+
This command bundles up the source files with source maps, starts
32+
a [watchify](https://github.com/substack/watchify) file watcher (making the your
33+
dev plotly.js bundle update every time a source file is saved) and opens up
34+
a tab in your browser.
3235

33-
- `npm run preprocess`, which converts `scss` and `svg` assets to `js` and
34-
- `npm run bundle`, which runs
35-
[browserify](https://github.com/substack/node-browserify) on the source files
36+
**Step 3** Open up the console and start developing
3637

37-
**Step 3** Start test dashboard
38+
Make some modification to the source, refresh the page and check the results
39+
by for example pasting in the console:
3840

39-
```
40-
npm run start-test_dashboard
41+
```js
42+
Plotly.plot(Tabs.fresh(), [{x:[1,2,3], y:[2,1,2]}]);
4143
```
4244

43-
This command bundles up the source files with source maps, starts
44-
[watchify](https://github.com/substack/watchify) file watcher (making the your
45-
dev plotly.js bundle update every time a source file is saved) and opens up
46-
a tab in your browser.
45+
**Other npm scripts**:
46+
47+
- `npm run preprocess`: pre-processes the css and svg source file in js. This
48+
script is run automatically on `npm install`.
49+
- `npm run watch`: starts a watchify file watcher just like the test dashboard but
50+
without booting up a server.
51+
- `npm run lint`: runs jshint on all source files
4752

4853
### Testing
4954

50-
```
51-
npm test
52-
```
55+
Both jasmine and image test are run on
56+
[CircleCI](https://circleci.com/gh/plotly/plotly.js) on every pushes to this
57+
repo.
5358

5459
Jasmine tests are run in a browser using
55-
[karma](https://github.com/karma-runner/karma)
60+
[karma](https://github.com/karma-runner/karma). To run them locally:
5661

5762
```
5863
npm run test-jasmine
5964
```
6065

61-
Image pixel comparison tests are run in a docker container
66+
Image pixel comparison tests are run in a docker container. For more
67+
information on how to run them locally, please refer to [image test
68+
README](https://github.com/plotly/plotly.js/blob/master/test/image/README.md).
6269

63-
```
64-
npm run test-image
65-
```
6670

6771
### Repo organization
6872

‎test/image/README.md

Copy file name to clipboardExpand all lines: test/image/README.md
+6-5Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,28 @@ Test plotly.js with Plotly Image-Server docker container.
88
Under your `plotly.js` folder, run
99

1010
```bash
11-
$ docker run -d --name imagetest \
11+
docker run -d --name imagetest \
1212
-v $PWD:/var/www/streambed/image_server/plotly.js \
1313
-p 9010:9010 -p 2022:22 plotly/imageserver:[version]
1414
```
1515

1616
where `[version]` is the latest Plotly Image-Server docker container version
1717
as listed on
18-
[hub.docker.com](https://hub.docker.com/r/plotly/imageserver/tags/).
18+
[hub.docker.com](https://hub.docker.com/r/plotly/imageserver/tags/) and
19+
`imagetest` is the name of the docker container.
1920

2021
### Run the tests
2122

2223
Under your `plotly.js` folder, run
2324

2425
```bash
25-
$ npm run test-image
26+
npm run test-image
2627
```
2728

2829
### SSH into docker
2930

3031
```bash
31-
$ ssh -p 2022 root@localhost # with password `root`
32+
ssh -p 2022 root@localhost # with password `root`
3233
```
3334

3435
If you got this error:
@@ -52,7 +53,7 @@ Host key verification failed.
5253
simply run
5354

5455
```bash
55-
$ ssh-keygen -f "${HOME}/.ssh/known_hosts" -R [localhost]:2022
56+
ssh-keygen -f "${HOME}/.ssh/known_hosts" -R [localhost]:2022
5657
```
5758

5859
to remove host information.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.