Skip to content

Commit 3cdbafd

Browse files
committed
use sane-topojson files from node_modules not vendor
1 parent 3b265ef commit 3cdbafd

File tree

6 files changed

+7
-23
lines changed

6 files changed

+7
-23
lines changed

devtools/test_dashboard/devtools.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
var Fuse = require('fuse.js/dist/fuse.common.js');
66
var mocks = require('../../build/test_dashboard_mocks.json');
77
var credentials = require('../../build/credentials.json');
8+
var constants = require('@src/plots/geo/constants');
89
var Lib = require('@src/lib');
910
var d3 = require('../../test/strict-d3');
1011
var d3Json = d3.json;
@@ -19,7 +20,7 @@ var Tabs = {
1920
Plotly.setPlotConfig({
2021

2122
// use local topojson files
22-
topojsonURL: '../../vendor/topojson/',
23+
topojsonURL: constants.pathToTopojsonSrc,
2324

2425
// register mapbox access token
2526
// run `npm run preset` if you haven't yet

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 .",

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
);

tasks/topojson_dist.js

-16
This file was deleted.

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

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: constants.pathToTopojsonSrc
2828
});
2929

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

0 commit comments

Comments
 (0)