Skip to content

Commit cdfc01a

Browse files
committed
Fixed issue with failing CDN pull when using highcharts < 6. See #134.
1 parent 1a118a4 commit cdfc01a

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# 2.0.14
2+
3+
* Fixed issue with CDN pull failing when using Highcharts < 6.0
4+
5+
# 2.0.13
6+
7+
* Fixed an issue that caused a comma to appear when exporting charts
8+
19
# 2.0.12
210

311
* Build.js now uses cached respones when building styled mode to speed things up

build.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ const cdnScriptsOptional = {
4141
'{{version}}/modules/sunburst.js': 1,
4242
'{{version}}/modules/xrange.js': 1,
4343
'{{version}}/modules/streamgraph.js': 1,
44-
'{{version}}/modules/tilemap.js': 1
44+
'{{version}}/modules/tilemap.js': 1,
45+
'{{version}}/modules/histogram-bellcurve.js': 1
4546
};
4647

4748
// The scripts here will appear as user prompts
@@ -53,14 +54,16 @@ const cdnScriptsQuery = {
5354
// Push raw URL's here to force include them
5455
const cdnAdditional = [];
5556

57+
// Push map collection includes here
58+
const cdnMapCollection = [];
59+
5660
const cdnScriptsCommon = [
5761
"{{version}}/highcharts-3d.js",
5862
"{{version}}/modules/data.js",
5963
"{{version}}/modules/funnel.js",
6064
"{{version}}/modules/solid-gauge.js",
6165
"{{version}}/modules/heatmap.js",
62-
"{{version}}/modules/treemap.js",
63-
"{{version}}/modules/histogram-bellcurve.js"
66+
"{{version}}/modules/treemap.js"
6467
].concat(Object.keys(cdnScriptsOptional));
6568

6669
const cdnScriptsStyled = [
@@ -271,8 +274,13 @@ function embedAll(version, includeStyled, includeMaps, includeMoment, optionals)
271274

272275
if (includeMaps) {
273276
console.log('Including maps support'.green);
274-
standard = standard.concat(cdnMaps);
275-
styled = styled.concat(cdnMaps);
277+
standard = standard.concat(cdnMaps).concat(cdnMapCollection);
278+
styled = styled.concat(cdnMaps).concat(cdnMapCollection);
279+
280+
// Map collections are user supplied, so we need to allow them to 404
281+
cdnMapCollection.forEach((url) => {
282+
cdnScriptsOptional[url] = 1;
283+
});
276284
}
277285

278286
if (includeMoment) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"url": "https://github.com/highcharts/node-export-server",
66
"type": "git"
77
},
8-
"version": "2.0.12",
8+
"version": "2.0.14",
99
"bin": {
1010
"highcharts-export-server": "./bin/cli.js"
1111
},

0 commit comments

Comments
 (0)