Skip to content

Commit 7347bed

Browse files
authored
Merge pull request #5492 from plotly/avoid-duplicate-topojson
Use topojson input from node_modules/sane-topojson
2 parents 69ffb2c + 815d047 commit 7347bed

21 files changed

+10
-40
lines changed

Diff for: devtools/test_dashboard/devtools.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var Tabs = {
1919
Plotly.setPlotConfig({
2020

2121
// use local topojson files
22-
topojsonURL: '../../vendor/topojson/',
22+
topojsonURL: '../../node_modules/sane-topojson/dist/',
2323

2424
// register mapbox access token
2525
// run `npm run preset` if you haven't yet

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
"plotly"
2222
],
2323
"scripts": {
24-
"preprocess": "node tasks/preprocess.js",
2524
"bundle": "node tasks/bundle.js",
2625
"header-dist": "node tasks/header_dist.js",
2726
"stats": "node tasks/stats.js",
2827
"find-strings": "node tasks/find_locale_strings.js",
29-
"build": "node tasks/empty_dist.js && npm run preprocess && node tasks/topojson_dist.js && npm run find-strings && npm run bundle && npm run header-dist && npm run stats",
28+
"preprocess": "node tasks/preprocess.js",
29+
"build": "node tasks/empty_dist.js && npm run preprocess && npm run find-strings && npm run bundle && npm run header-dist && npm run stats",
3030
"cibuild": "node tasks/empty_dist.js && npm run preprocess && node tasks/cibundle.js",
3131
"watch": "node tasks/watch.js",
3232
"lint": "eslint --version && eslint .",

Diff for: tasks/preprocess.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ function makeBuildCSS() {
2424
});
2525
}
2626

27-
// copy topojson files from sane-topojson to vendor/
27+
// copy topojson files from sane-topojson to dist/
2828
function copyTopojsonFiles() {
2929
fs.copy(
3030
constants.pathToTopojsonSrc,
31-
constants.pathToTopojsonVendor,
31+
constants.pathToTopojsonDist,
3232
{ clobber: true },
3333
common.throwOnError
3434
);

Diff for: tasks/topojson_dist.js

-16
This file was deleted.

Diff for: tasks/util/constants.js

-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ module.exports = {
6565

6666
pathToTopojsonSrc: pathToTopojsonSrc,
6767
pathToTopojsonDist: path.join(pathToDist, 'topojson/'),
68-
pathToTopojsonVendor: path.join(pathToVendor, 'topojson/'),
6968
pathToPlotlyGeoAssetsSrc: path.join(pathToSrc, 'assets/geo_assets.js'),
7069
pathToPlotlyGeoAssetsDist: path.join(pathToDist, 'plotly-geo-assets.js'),
7170

Diff for: test/jasmine/karma.conf.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ var pathToStrictD3 = path.join(__dirname, '..', '..', 'tasks', 'util', 'strict_d
121121
var pathToJQuery = path.join(__dirname, 'assets', 'jquery-1.8.3.min.js');
122122
var pathToCustomMatchers = path.join(__dirname, 'assets', 'custom_matchers.js');
123123
var pathToUnpolyfill = path.join(__dirname, 'assets', 'unpolyfill.js');
124+
var pathToSaneTopojsonDist = path.join(__dirname, '..', '..', 'node_modules', 'sane-topojson', 'dist');
124125
var pathToMathJax = path.join(constants.pathToVendor, 'extras', 'mathjax');
125126

126127
var reporters = [];
@@ -179,11 +180,11 @@ func.defaultConfig = {
179180
files: [
180181
pathToCustomMatchers,
181182
pathToUnpolyfill,
182-
// available to fetch from /base/path/to/mathjax
183+
// available to fetch from /base/vendor/extras/mathjax/
183184
// more info: http://karma-runner.github.io/3.0/config/files.html
184185
{pattern: pathToMathJax + '/**', included: false, watched: false, served: true},
185-
// available to fetch local topojson files
186-
{pattern: constants.pathToTopojsonVendor + '/**', included: false, watched: false, served: true}
186+
// available to fetch from /base/node_modules/sane-topojson/dist/
187+
{pattern: pathToSaneTopojsonDist + '/**', included: false, watched: false, served: true}
187188
],
188189

189190
// list of files / pattern to exclude

Diff for: test/jasmine/tests/geo_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var HOVERMINTIME = require('@src/components/fx').constants.HOVERMINTIME;
2424

2525
// use local topojson files
2626
Plotly.setPlotConfig({
27-
topojsonURL: '/base/vendor/topojson/'
27+
topojsonURL: '/base/node_modules/sane-topojson/dist/'
2828
});
2929

3030
function move(fromX, fromY, toX, toY, delay) {

Diff for: vendor/topojson/africa_110m.json

-1
This file was deleted.

Diff for: vendor/topojson/africa_50m.json

-1
This file was deleted.

Diff for: vendor/topojson/asia_110m.json

-1
This file was deleted.

Diff for: vendor/topojson/asia_50m.json

-1
This file was deleted.

Diff for: vendor/topojson/europe_110m.json

-1
This file was deleted.

Diff for: vendor/topojson/europe_50m.json

-1
This file was deleted.

Diff for: vendor/topojson/north-america_110m.json

-1
This file was deleted.

Diff for: vendor/topojson/north-america_50m.json

-1
This file was deleted.

Diff for: vendor/topojson/south-america_110m.json

-1
This file was deleted.

Diff for: vendor/topojson/south-america_50m.json

-1
This file was deleted.

Diff for: vendor/topojson/usa_110m.json

-1
This file was deleted.

Diff for: vendor/topojson/usa_50m.json

-1
This file was deleted.

Diff for: vendor/topojson/world_110m.json

-1
This file was deleted.

Diff for: vendor/topojson/world_50m.json

-1
This file was deleted.

0 commit comments

Comments
 (0)