@@ -22,47 +22,51 @@ cd plotly.js
2222npm 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
5459Jasmine 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```
5863npm 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
0 commit comments