Skip to content

Commit 0a78842

Browse files
committed
Merge pull request #183 from plotly/js-not-json
Replace json assets by js files
2 parents 58e86d9 + bfed05c commit 0a78842

21 files changed

+420
-71
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"start-test_dashboard": "node devtools/test_dashboard/server.js",
3737
"start-image_viewer": "node devtools/image_viewer/server.js",
3838
"baseline": "./tasks/baseline.sh",
39-
"version": "npm run build && git add -A dist",
39+
"version": "npm run build && git add -A dist src",
4040
"postversion": "git push && git push --tags"
4141
},
4242
"dependencies": {
@@ -54,15 +54,15 @@
5454
"gl-line2d": "^1.2.1",
5555
"gl-line3d": "^1.0.1",
5656
"gl-mat4": "^1.1.2",
57-
"gl-mesh3d": "^1.0.4",
57+
"gl-mesh3d": "^1.0.7",
5858
"gl-plot2d": "^1.1.6",
5959
"gl-plot3d": "^1.3.0",
6060
"gl-scatter2d": "^1.0.5",
6161
"gl-scatter2d-fancy": "^1.1.1",
6262
"gl-scatter3d": "^1.0.4",
6363
"gl-select-box": "^1.0.1",
6464
"gl-spikes2d": "^1.0.1",
65-
"gl-surface3d": "^1.1.0",
65+
"gl-surface3d": "^1.1.1",
6666
"mouse-change": "^1.1.1",
6767
"mouse-wheel": "^1.0.2",
6868
"ndarray": "^1.0.16",

src/assets/geo_assets.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
var saneTopojson = require('sane-topojson');
1212

1313

14-
// export the version found in the package.json
15-
exports.version = require('../../package.json').version;
14+
// package version injected by `npm run preprocess`
15+
exports.version = '1.4.1';
1616

1717
exports.topojson = saneTopojson;

src/constants/country-name_to_iso3.js

+268
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,268 @@
1+
/**
2+
* Copyright 2012-2016, Plotly, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
10+
'use strict';
11+
12+
module.exports = {
13+
DZA: 'algeria',
14+
AGO: 'angola',
15+
EGY: 'egypt',
16+
BGD: 'bangladesh|^(?=.*east).*paki?stan',
17+
NER: '\\bniger(?!ia)',
18+
LIE: 'liechtenstein',
19+
NAM: 'namibia',
20+
BGR: 'bulgaria',
21+
BOL: 'bolivia',
22+
GHA: 'ghana|gold.?coast',
23+
CCK: '\\bcocos|keeling',
24+
PAK: '^(?!.*east).*paki?stan',
25+
CPV: 'verde',
26+
JOR: 'jordan',
27+
LBR: 'liberia',
28+
LBY: 'libya',
29+
MYS: 'malaysia',
30+
IOT: 'british.?indian.?ocean',
31+
PRI: 'puerto.?rico',
32+
MYT: 'mayotte',
33+
PRK: '^(?=.*democrat).*\\bkorea|^(?=.*people).*\\bkorea|^(?=.*north).*\\bkorea|\\bd\\.?p\\.?r\\.?k',
34+
PSE: 'palestin|\\bgaza|west.?bank',
35+
TZA: 'tanzania',
36+
BWA: 'botswana|bechuana',
37+
KHM: 'cambodia|kampuchea|khmer|^p\\.?r\\.?k\\.?$',
38+
UMI: 'minor.?outlying.?is',
39+
TTO: 'trinidad|tobago',
40+
PRY: 'paraguay',
41+
HKG: 'hong.?kong',
42+
SAU: '\\bsa\\w*.?arabia',
43+
LBN: 'lebanon',
44+
SVN: 'slovenia',
45+
BFA: 'burkina|\\bfaso|upper.?volta',
46+
SVK: '^(?!.*cze).*slovak',
47+
MRT: 'mauritania',
48+
HRV: 'croatia',
49+
CHL: '\\bchile',
50+
CHN: '^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai).*china|^p\\.?r\\.?c\\.?$',
51+
KNA: 'kitts|\\bnevis',
52+
JAM: 'jamaica',
53+
SMR: 'san.?marino',
54+
GIB: 'gibraltar',
55+
DJI: 'djibouti',
56+
GIN: '^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea',
57+
FIN: 'finland',
58+
URY: 'uruguay',
59+
VAT: 'holy.?see|vatican|papal.?st',
60+
STP: '\\bs(a|ã)o.?tom(e|é)',
61+
SYC: 'seychell',
62+
NPL: 'nepal',
63+
CXR: 'christmas',
64+
LAO: '\\blaos?\\b',
65+
YEM: '^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen',
66+
BVT: 'bouvet',
67+
ZAF: '\\bs\\w*.?africa',
68+
KIR: 'kiribati',
69+
PHL: 'philippines',
70+
SXM: '^(?!.*martin)(?!.*saba).*maarten',
71+
ROU: 'r(o|u|ou)mania',
72+
VIR: '^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin',
73+
SYR: 'syria',
74+
MAC: 'maca(o|u)',
75+
NFK: 'norfolk',
76+
NIC: 'nicaragua',
77+
MLT: '\\bmalta',
78+
KAZ: 'kazak',
79+
TCA: 'turks',
80+
PYF: 'french.?polynesia|tahiti',
81+
NIU: 'niue',
82+
DMA: 'dominica(?!n)',
83+
GBR: 'united.?kingdom|britain|^u\\.?k\\.?$',
84+
BEN: 'benin|dahome',
85+
GUF: '^(?=.*french).*guiana',
86+
BEL: '^(?!.*luxem).*belgium',
87+
MSR: 'montserrat',
88+
TGO: 'togo',
89+
DEU: '^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german',
90+
GUM: '\\bguam',
91+
LKA: 'sri.?lanka|ceylon',
92+
SSD: '\\bs\\w*.?sudan',
93+
FLK: 'falkland|malvinas',
94+
PCN: 'pitcairn',
95+
BES: '^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands',
96+
GUY: 'guyana|british.?guiana',
97+
CRI: 'costa.?rica',
98+
COK: '\\bcook',
99+
MAR: 'morocco|\\bmaroc',
100+
MNP: 'mariana',
101+
LSO: 'lesotho|basuto',
102+
HUN: '^(?!.*austr).*hungary',
103+
TKM: 'turkmen',
104+
SUR: 'surinam|dutch.?guiana',
105+
NLD: '^(?!.*\\bant)(?!.*\\bcarib).*netherlands',
106+
BMU: 'bermuda',
107+
HMD: 'heard.*mcdonald',
108+
TCD: '\\bchad',
109+
GEO: '^(?!.*south).*georgia',
110+
MNE: '^(?!.*serbia).*montenegro',
111+
MNG: 'mongolia',
112+
MHL: 'marshall',
113+
MTQ: 'martinique',
114+
CSK: 'czechoslovakia',
115+
BLZ: 'belize|^(?=.*british).*honduras',
116+
DDR: 'german.?democratic.?republic|^(d|g)\\.?d\\.?r\\.?$|^(?=.*east).*germany',
117+
MMR: 'myanmar|burma',
118+
AFG: 'afghan',
119+
BDI: 'burundi',
120+
VGB: '^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin',
121+
BLR: 'belarus|byelo',
122+
BLM: 'barth(e|é)lemy',
123+
GRD: 'grenada',
124+
TKL: 'tokelau',
125+
GRC: 'greece|hellenic|hellas',
126+
GRL: 'greenland',
127+
SHN: 'helena',
128+
AND: 'andorra',
129+
MOZ: 'mozambique',
130+
TJK: 'tajik',
131+
THA: 'thailand|\\bsiam',
132+
HTI: 'haiti',
133+
MEX: '\\bmexic',
134+
ANT: '^(?=.*\\bant).*(nether|dutch)',
135+
ZWE: 'zimbabwe|^(?!.*northern).*rhodesia',
136+
LCA: '\\blucia',
137+
IND: 'india(?!.*ocea)',
138+
LVA: 'latvia',
139+
BTN: 'bhutan',
140+
VCT: 'vincent',
141+
VNM: '^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam',
142+
NOR: 'norway',
143+
CZE: '^(?=.*rep).*czech|czechia|bohemia',
144+
ATF: 'french.?southern|\\bfr.*\\bso.*\\ban.*\\b\\bt',
145+
ATG: 'antigua',
146+
FJI: 'fiji',
147+
HND: '^(?!.*brit).*honduras',
148+
MUS: 'mauritius',
149+
DOM: 'dominican',
150+
LUX: '^(?!.*belg).*luxem',
151+
ISR: 'israel',
152+
YUG: 'yugoslavia',
153+
FSM: 'micronesia',
154+
PER: 'peru',
155+
REU: 'r(e|é)union',
156+
IDN: 'indonesia',
157+
VUT: 'vanuatu|new.?hebrides',
158+
MKD: 'macedonia|^f\\.?y\\.?r\\.?o\\.?m\\.?$',
159+
COD: '\\bdem.*congo|congo.*\\bdem|congo.*\\bdr|\\bdr.*congo|\\bd\\.?r\\.?c|\\bd\\.?r\\.?o\\.?c|\\br\\.?d\\.?c|belgian.?congo|congo.?free.?state|kinshasa|zaire|l\\w{1,2}opoldville',
160+
COG: '^(?!.*\\bdem)(?!.*\\bdr)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l\\w{1,2}opoldville)(?!.*free).*\\bcongo',
161+
ISL: 'iceland',
162+
GLP: 'guadeloupe',
163+
ETH: 'ethiopia|abyssinia',
164+
COM: 'comoro',
165+
COL: 'colombia',
166+
NGA: 'nigeria',
167+
TLS: '^(?=.*leste).*timor|^(?=.*east).*timor',
168+
TWN: 'taiwan|taipei|formosa',
169+
PRT: 'portugal',
170+
MDA: 'moldov|b(a|e)ssarabia',
171+
GGY: 'guernsey',
172+
MDG: 'madagascar|malagasy',
173+
ATA: 'antarctica',
174+
ECU: 'ecuador',
175+
SEN: 'senegal',
176+
ESH: 'sahara',
177+
MDV: 'maldive',
178+
ASM: '^(?=.*americ).*samoa',
179+
SPM: 'miquelon',
180+
CUW: '^(?!.*bonaire).*\\bcura(c|ç)ao',
181+
FRA: '^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul',
182+
LTU: 'lithuania',
183+
RWA: 'rwanda',
184+
ZMB: 'zambia|northern.?rhodesia',
185+
GMB: 'gambia',
186+
WLF: 'futuna|wallis',
187+
JEY: 'jersey',
188+
FRO: 'faroe|faeroe',
189+
GTM: 'guatemala',
190+
DNK: 'denmark',
191+
IMN: '^(?=.*isle).*\\bman',
192+
MAF: '^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)',
193+
AUS: 'australia',
194+
AUT: '^(?!.*hungary).*austria|\\baust.*\\bemp',
195+
SJM: 'svalbard',
196+
VEN: 'venezuela',
197+
PLW: 'palau',
198+
KEN: 'kenya|british.?east.?africa|east.?africa.?prot',
199+
TUR: 'turkey',
200+
ALB: 'albania',
201+
OMN: '\\boman|trucial',
202+
TUV: 'tuvalu',
203+
ALA: '\\b(a|å)land',
204+
BRN: 'brunei',
205+
TUN: 'tunisia',
206+
RUS: '\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics',
207+
BRB: 'barbados',
208+
BRA: 'brazil',
209+
CIV: 'ivoire|ivory',
210+
SRB: '^(?!.*monte).*serbia',
211+
GNQ: 'guine.*eq|eq.*guine|^(?=.*span).*guinea',
212+
USA: '^(?!.*islands).*united.?states|^u\\.?s\\.?a\\.?$|^u\\.?s\\.?$',
213+
QAT: 'qatar',
214+
WSM: '^(?!.*amer).*samoa',
215+
AZE: 'azerbaijan',
216+
GNB: 'bissau|^(?=.*portu).*guinea',
217+
SWZ: 'swaziland',
218+
TON: 'tonga',
219+
CAN: 'canada',
220+
UKR: 'ukrain',
221+
KOR: '^(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea|\\br\\.?o\\.?k\\b',
222+
AIA: 'anguill?a',
223+
CAF: '\\bcen.*\\baf|^c\\.?a\\.?r\\.?$',
224+
CHE: 'switz|swiss',
225+
CYP: 'cyprus',
226+
BIH: 'herzegovina|bosnia',
227+
SGP: 'singapore',
228+
SGS: 'south.?georgia|sandwich',
229+
SOM: 'somali',
230+
UZB: 'uzbek',
231+
CMR: 'cameroon',
232+
POL: 'poland',
233+
EAZ: 'zanz',
234+
KWT: 'kuwait',
235+
ERI: 'eritrea',
236+
GAB: 'gabon',
237+
CYM: 'cayman',
238+
ARE: 'emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em',
239+
EST: 'estonia',
240+
MWI: 'malawi|nyasa',
241+
ESP: 'spain',
242+
IRQ: '\\biraq|mesopotamia',
243+
SLV: 'el.?salvador',
244+
MLI: '\\bmali\\b',
245+
YMD: '^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen',
246+
IRL: 'ireland',
247+
IRN: '\\biran|persia',
248+
ABW: '^(?!.*bonaire).*\\baruba',
249+
SLE: 'sierra',
250+
PAN: 'panama',
251+
SDN: '^(?!.*\\bs(?!u)).*sudan',
252+
SLB: 'solomon',
253+
NZL: 'new.?zealand',
254+
MCO: 'monaco',
255+
ITA: 'italy',
256+
JPN: 'japan',
257+
KGZ: 'kyrgyz|kirghiz',
258+
UGA: 'uganda',
259+
NCL: 'new.?caledonia',
260+
PNG: 'papua|\\bp.*\\bn.*\\bguin.*|^p\\.?n\\.?g\\.?$|new.?guinea',
261+
ARG: 'argentin',
262+
SWE: 'sweden',
263+
BHS: 'bahamas',
264+
BHR: 'bahrain',
265+
ARM: 'armenia',
266+
NRU: 'nauru',
267+
CUB: '\\bcuba'
268+
};

src/constants/country-name_to_iso3.json

-1
This file was deleted.

src/constants/gl2d_dashes.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Copyright 2012-2016, Plotly, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
10+
'use strict';
11+
12+
module.exports = {
13+
solid: [1],
14+
dot: [1, 1],
15+
dash: [4, 1],
16+
longdash: [8, 1],
17+
dashdot: [4, 1, 1, 1],
18+
longdashdot: [8, 1, 1, 1]
19+
};

src/constants/gl2d_dashes.json

-8
This file was deleted.

src/constants/gl3d_dashes.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Copyright 2012-2016, Plotly, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
10+
'use strict';
11+
12+
module.exports = {
13+
solid: [[], 0],
14+
dot: [[0.5, 1], 200],
15+
dash: [[0.5, 1], 50],
16+
longdash: [[0.5, 1], 10],
17+
dashdot: [[0.5, 0.625, 0.875, 1], 50],
18+
longdashdot: [[0.5, 0.7, 0.8, 1], 10]
19+
};

src/constants/gl3d_dashes.json

-8
This file was deleted.

src/constants/gl_markers.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Copyright 2012-2016, Plotly, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
10+
'use strict';
11+
12+
module.exports = {
13+
circle: '●',
14+
'circle-open': '○',
15+
square: '■',
16+
'square-open': '□',
17+
diamond: '◆',
18+
'diamond-open': '◇',
19+
cross: '+',
20+
x: '❌'
21+
};

0 commit comments

Comments
 (0)