From fa5944d74b94ac8d59786f6c0bf95a1cefc69969 Mon Sep 17 00:00:00 2001 From: etpinard Date: Wed, 18 Nov 2015 11:46:10 -0500 Subject: [PATCH 1/5] add link to browserify in CONTIRUBTING --- CONTRIBUTING.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d08b58d954c..e2f0cf54e9c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,10 +28,11 @@ npm install npm run start-test_dashboard ``` -This command bundles up the source files with source maps, starts -a [watchify](https://github.com/substack/watchify) file watcher (making the your -dev plotly.js bundle update every time a source file is saved) and opens up -a tab in your browser. +This command bundles up the source files with source maps using +[browserify](https://github.com/substack/node-browserify), starts a +[watchify](https://github.com/substack/watchify) file watcher (making the your +dev plotly.js bundle update every time a source file is saved) and opens up a +tab in your browser. **Step 3** Open up the console and start developing From e2aebe64e40a75a1c650c564f91ee48f38e5c025 Mon Sep 17 00:00:00 2001 From: etpinard Date: Wed, 18 Nov 2015 11:46:42 -0500 Subject: [PATCH 2/5] add info about Tabs in CONTRIBUTING --- CONTRIBUTING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e2f0cf54e9c..a993fa76b95 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,6 +43,9 @@ by for example pasting in the console: Plotly.plot(Tabs.fresh(), [{x:[1,2,3], y:[2,1,2]}]); ``` +- `Tabs.fresh()` creates a fresh graph div and return it and +- `Tabs.getGraph()` returns the current graph div. + **Other npm scripts**: - `npm run preprocess`: pre-processes the css and svg source file in js. This From 99f9298bb0daa8e866b59471b7fe90ddf735b37e Mon Sep 17 00:00:00 2001 From: etpinard Date: Wed, 18 Nov 2015 11:47:00 -0500 Subject: [PATCH 3/5] add minimal coding style requirements --- CONTRIBUTING.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a993fa76b95..af17fd3da60 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -74,4 +74,10 @@ README](https://github.com/plotly/plotly.js/blob/master/test/image/README.md). ### Repo organization + + ### Coding style + +- 4-space indentation +- semi-colons are required +- trailing commas From 936af2aef99ae96d86ea809e8dbb2b869c77194f Mon Sep 17 00:00:00 2001 From: etpinard Date: Tue, 24 Nov 2015 16:02:02 -0500 Subject: [PATCH 4/5] add Alex Vados to Creators table --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a4eb76eb632..0e26796856e 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,7 @@ plotly.js charts can also be created and saved online for free at [plot.ly/plot] |**Ben Postlethwaite**| [@bpostlethwaite](https://github.com/bpostlethwaite) | | |**Chris Parmer**| [@chriddyp](https://github.com/chriddyp) | | |**Chelsea Douglas**| [@cldougl](https://github.com/cldougl) | | +|**Alex Vados**| [@alexander-daniel](https://github.com/alexander-daniel) | | ## Copyright and license From 6fa52c17275d2c2457af20fcc1062bcd6be0efb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 25 Nov 2015 10:12:24 -0500 Subject: [PATCH 5/5] Update CONTRIBUTING.md --- CONTRIBUTING.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index af17fd3da60..3b3af500015 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,7 +52,6 @@ Plotly.plot(Tabs.fresh(), [{x:[1,2,3], y:[2,1,2]}]); script is run automatically on `npm install`. - `npm run watch`: starts a watchify file watcher just like the test dashboard but without booting up a server. -- `npm run lint`: runs jshint on all source files ### Testing @@ -71,9 +70,27 @@ Image pixel comparison tests are run in a docker container. For more information on how to run them locally, please refer to [image test README](https://github.com/plotly/plotly.js/blob/master/test/image/README.md). +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). + +To view the image pixel comparison test results, run + +``` +npm run start-image_viewer +``` +which shows the baseline image, the generated image, the diff and the json mocks of test cases that failed. + +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`. + ### Repo organization +- Distributed files are in `dist/` +- Sources files are in `src/`, including the index. +- Build and repo management scripts are in `./tasks/` +- All tasks can be run using [`npm run-srcript`](https://docs.npmjs.com/cli/run-script) +- Tests are `test/`, they are partitioned into `image` and `jasmine` tests +- Test dashboard and image viewer code is in `devtools/` +- Non-distributed, git-ignored built files are in `build/` ### Coding style @@ -81,3 +98,5 @@ README](https://github.com/plotly/plotly.js/blob/master/test/image/README.md). - 4-space indentation - semi-colons are required - trailing commas + +Check if ok, with `npm run lint`