Skip to content

Commit 9f8b7be

Browse files
committed
Added cdnURL prompt. See #133
1 parent e6e2449 commit 9f8b7be

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Master
22
* Added `queueSize` option to `initPool` to set the request overfow queue size
3+
* Added option to supply `cdnURL` to build script (#133)
34

45
# 2.0.14
56

build.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ const request = require('request');
3333
const async = require('async');
3434
const template = fs.readFileSync(__dirname + '/phantom/template.html').toString();
3535
const package = require(__dirname + '/package.json');
36-
const cdnURL = 'https://code.highcharts.com/';
36+
37+
let cdnURL = 'https://code.highcharts.com/';
3738

3839
// We allow the fetch for these to fail without error.
3940
// This is because it's only available in version 6+
@@ -138,6 +139,10 @@ let schema = {
138139
default: 'no',
139140
required: true,
140141
conform: boolConform
142+
},
143+
cdnURL: {
144+
description: 'Which CDN would you like to use?',
145+
default: cdnURL
141146
}
142147
}
143148
};
@@ -342,6 +347,8 @@ function startPrompt() {
342347
prompt.get(schema, function (err, result) {
343348
result.agree = result.agree.toUpperCase();
344349

350+
cdnURL = result.cdnURL || cdnURL;
351+
345352
if (result.agree === 'Y' || result.agree === 'YES') {
346353
embedAll(result.version,
347354
affirmative(result.styledMode),

0 commit comments

Comments
 (0)