Skip to content

Commit 4f3b448

Browse files
authored
move info about mapbox to step-by-step section
1 parent b8a6066 commit 4f3b448

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

CONTRIBUTING.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,18 @@ cd plotly.js
7373
npm install
7474
```
7575

76-
#### Step 2: Start the test dashboard
76+
#### Step 2: Setup Mapbox access token
77+
78+
As of `v1.13.0`, plotly.js includes a [`mapbox-gl`](https://github.com/mapbox/mapbox-gl-js) integration. Creating `mapbox-gl` graphs requires an
79+
[`accessToken`](https://www.mapbox.com/help/define-access-token/). To make sure
80+
that the plotly.js test suites and devtools work properly, locate your Mapbox access
81+
token and run:
82+
83+
```bash
84+
export MAPBOX_ACCESS_TOKEN="<your access token>" && npm run pretest
85+
```
86+
87+
#### Step 3: Start the test dashboard
7788

7889
```
7990
npm start
@@ -85,7 +96,7 @@ This command bundles up the source files with source maps using
8596
dev plotly.js bundle update every time a source file is saved) and opens up a
8697
tab in your browser.
8798

88-
#### Step 3: Open up the console and start developing
99+
#### Step 4: Open up the console and start developing
89100

90101
A typical workflow is to make some modifications to the source, update the
91102
test dashboard, inspect and debug the changes, then repeat. The test dashboard
@@ -158,18 +169,6 @@ which shows the baseline image, the generated image, the diff and the json mocks
158169

159170
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`.
160171

161-
### Note on testing our `mapbox-gl` integration
162-
163-
Creating `mapbox-gl` graphs requires an
164-
[`accessToken`](https://www.mapbox.com/help/define-access-token/). To make sure
165-
that mapbox image and jasmine tests run properly, locate your Mapbox access
166-
token and run:
167-
168-
169-
```bash
170-
export MAPBOX_ACCESS_TOKEN="<your access token>" && npm run pretest
171-
```
172-
173172

174173
## Repo organization
175174

0 commit comments

Comments
 (0)