Skip to content

Commit 60ae004

Browse files
author
Richard Nicolaas Meijerink
committed
Merge remote-tracking branch 'upstream/master' into circleci-project-setup
2 parents 76ebc0c + 8bf6d89 commit 60ae004

File tree

706 files changed

+1334603
-1532213
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

706 files changed

+1334603
-1532213
lines changed

.circleci/config.yml

+527-10
Large diffs are not rendered by default.

.circleci/test.sh

+24
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@ case $1 in
5353
exit $EXIT_STATE
5454
;;
5555

56+
virtual-webgl-jasmine)
57+
SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --limit=5 --tag=gl | circleci tests split))
58+
for s in ${SHARDS[@]}; do
59+
MAX_AUTO_RETRY=2
60+
retry ./node_modules/karma/bin/karma start test/jasmine/karma.conf.js --virtualWebgl --tags=gl --skip-tags=noCI,noVirtualWebgl --doNotFailOnEmptyTestSuite -- "$s"
61+
done
62+
63+
exit $EXIT_STATE
64+
;;
65+
5666
flaky-no-gl-jasmine)
5767
SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --limit=1 --tag=flaky | circleci tests split))
5868

@@ -82,6 +92,15 @@ case $1 in
8292
exit $EXIT_STATE
8393
;;
8494

95+
make-baselines-virtual-webgl)
96+
SUITE=$({\
97+
find $ROOT/test/image/mocks/gl* -type f -printf "%f\n"; \
98+
find $ROOT/test/image/mocks/mapbox* -type f -printf "%f\n"; \
99+
} | sed 's/\.json$//1' | circleci tests split)
100+
python3 test/image/make_baseline.py virtual-webgl $SUITE || EXIT_STATE=$?
101+
exit $EXIT_STATE
102+
;;
103+
85104
make-baselines-mathjax3)
86105
python3 test/image/make_baseline.py mathjax3 legend_mathjax_title_and_items mathjax parcats_grid_subplots table_latex_multitrace_scatter table_plain_birds table_wrapped_birds ternary-mathjax || EXIT_STATE=$?
87106
exit $EXIT_STATE
@@ -103,6 +122,11 @@ case $1 in
103122
exit $EXIT_STATE
104123
;;
105124

125+
test-image-virtual-webgl)
126+
node test/image/compare_pixels_test.js virtual-webgl || { tar -cvf build/baselines.tar build/test_images/*.png ; exit 1 ; } || EXIT_STATE=$?
127+
exit $EXIT_STATE
128+
;;
129+
106130
source-syntax)
107131
npm run lint || EXIT_STATE=$?
108132
npm run test-syntax || EXIT_STATE=$?

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ node_modules
33
dist
44
build
55

6+
tasks/test_amdefine.js
67
tasks/test_requirejs.js
78
test/jasmine/assets/jquery-1.8.3.min.js

.eslintrc

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"no-floating-decimal": [2],
5656
"space-infix-ops": [2, {"int32Hint": true}],
5757
"quotes": [2, "single"],
58+
"quote-props": ["error", "as-needed"],
5859
"dot-notation": [2],
5960
"dot-location": [2, "property"],
6061
"operator-linebreak": [2, "after"],

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ build/*
44
!build/plotcss.js
55
!build/README.md
66

7+
dist/*.LICENSE.txt
8+
79
npm-debug.log*
810
*.sublime*
911
*~

BUILDING.md

-35
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,6 @@ Depending on your needs you may require/import one of [the distributed plotly.js
33

44
The sections below provide additional info in respect to alternative building frameworks.
55

6-
## Browserify example
7-
8-
Given source file:
9-
```js
10-
// file: index.js
11-
var Plotly = require('plotly.js-dist-min');
12-
// ....
13-
```
14-
15-
then simply run
16-
17-
```sh
18-
browserify index.js > bundle.js
19-
```
20-
21-
---
22-
## Webpack
23-
24-
For plotly.js to build with Webpack you will need to install [[email protected]+](https://github.com/hughsk/ify-loader) and add it to your `webpack.config.json`. This adds Browserify transform compatibility to Webpack which is necessary for some plotly.js dependencies.
25-
26-
A repo that demonstrates how to build plotly.js with Webpack can be found [here](https://github.com/plotly/plotly-webpack). In short add `ify-loader` to the `module` section in your `webpack.config.js`:
27-
28-
```js
29-
...
30-
module: {
31-
rules: [
32-
{
33-
test: /\.js$/,
34-
loader: 'ify-loader'
35-
}
36-
]
37-
},
38-
...
39-
```
40-
416
---
427
## Angular CLI
438

0 commit comments

Comments
 (0)