Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use topojson input from node_modules/sane-topojson #5492

Merged
merged 4 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion devtools/test_dashboard/devtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var Tabs = {
Plotly.setPlotConfig({

// use local topojson files
topojsonURL: '../../vendor/topojson/',
topojsonURL: '../../node_modules/sane-topojson/dist/',

// register mapbox access token
// run `npm run preset` if you haven't yet
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"plotly"
],
"scripts": {
"preprocess": "node tasks/preprocess.js",
"bundle": "node tasks/bundle.js",
"header-dist": "node tasks/header_dist.js",
"stats": "node tasks/stats.js",
"find-strings": "node tasks/find_locale_strings.js",
"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",
"preprocess": "node tasks/preprocess.js",
"build": "node tasks/empty_dist.js && npm run preprocess && npm run find-strings && npm run bundle && npm run header-dist && npm run stats",
"cibuild": "node tasks/empty_dist.js && npm run preprocess && node tasks/cibundle.js",
"watch": "node tasks/watch.js",
"lint": "eslint --version && eslint .",
Expand Down
4 changes: 2 additions & 2 deletions tasks/preprocess.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ function makeBuildCSS() {
});
}

// copy topojson files from sane-topojson to vendor/
// copy topojson files from sane-topojson to dist/
function copyTopojsonFiles() {
fs.copy(
constants.pathToTopojsonSrc,
constants.pathToTopojsonVendor,
constants.pathToTopojsonDist,
{ clobber: true },
common.throwOnError
);
Expand Down
16 changes: 0 additions & 16 deletions tasks/topojson_dist.js

This file was deleted.

1 change: 0 additions & 1 deletion tasks/util/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ module.exports = {

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

Expand Down
7 changes: 4 additions & 3 deletions test/jasmine/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ var pathToStrictD3 = path.join(__dirname, '..', '..', 'tasks', 'util', 'strict_d
var pathToJQuery = path.join(__dirname, 'assets', 'jquery-1.8.3.min.js');
var pathToCustomMatchers = path.join(__dirname, 'assets', 'custom_matchers.js');
var pathToUnpolyfill = path.join(__dirname, 'assets', 'unpolyfill.js');
var pathToSaneTopojsonDist = path.join(__dirname, '..', '..', 'node_modules', 'sane-topojson', 'dist');
var pathToMathJax = path.join(constants.pathToVendor, 'extras', 'mathjax');

var reporters = [];
Expand Down Expand Up @@ -179,11 +180,11 @@ func.defaultConfig = {
files: [
pathToCustomMatchers,
pathToUnpolyfill,
// available to fetch from /base/path/to/mathjax
// available to fetch from /base/vendor/extras/mathjax/
// more info: http://karma-runner.github.io/3.0/config/files.html
{pattern: pathToMathJax + '/**', included: false, watched: false, served: true},
// available to fetch local topojson files
{pattern: constants.pathToTopojsonVendor + '/**', included: false, watched: false, served: true}
// available to fetch from /base/node_modules/sane-topojson/dist/
{pattern: pathToSaneTopojsonDist + '/**', included: false, watched: false, served: true}
],

// list of files / pattern to exclude
Expand Down
2 changes: 1 addition & 1 deletion test/jasmine/tests/geo_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var HOVERMINTIME = require('@src/components/fx').constants.HOVERMINTIME;

// use local topojson files
Plotly.setPlotConfig({
topojsonURL: '/base/vendor/topojson/'
topojsonURL: '/base/node_modules/sane-topojson/dist/'
});

function move(fromX, fromY, toX, toY, delay) {
Expand Down
1 change: 0 additions & 1 deletion vendor/topojson/africa_110m.json

This file was deleted.

1 change: 0 additions & 1 deletion vendor/topojson/africa_50m.json

This file was deleted.

1 change: 0 additions & 1 deletion vendor/topojson/asia_110m.json

This file was deleted.

1 change: 0 additions & 1 deletion vendor/topojson/asia_50m.json

This file was deleted.

1 change: 0 additions & 1 deletion vendor/topojson/europe_110m.json

This file was deleted.

1 change: 0 additions & 1 deletion vendor/topojson/europe_50m.json

This file was deleted.

1 change: 0 additions & 1 deletion vendor/topojson/north-america_110m.json

This file was deleted.

1 change: 0 additions & 1 deletion vendor/topojson/north-america_50m.json

This file was deleted.

1 change: 0 additions & 1 deletion vendor/topojson/south-america_110m.json

This file was deleted.

1 change: 0 additions & 1 deletion vendor/topojson/south-america_50m.json

This file was deleted.

1 change: 0 additions & 1 deletion vendor/topojson/usa_110m.json

This file was deleted.

1 change: 0 additions & 1 deletion vendor/topojson/usa_50m.json

This file was deleted.

1 change: 0 additions & 1 deletion vendor/topojson/world_110m.json

This file was deleted.

1 change: 0 additions & 1 deletion vendor/topojson/world_50m.json

This file was deleted.