Skip to content

Commit

Permalink
Merge pull request #6141 from plotly/fixup-strict-regl
Browse files Browse the repository at this point in the history
Regenerate functions for regl-based traces in the strict bundle
  • Loading branch information
archmoj authored Mar 15, 2022
2 parents 24474d3 + 463897c commit a3ba6fa
Show file tree
Hide file tree
Showing 35 changed files with 23,011 additions and 23,476 deletions.
27 changes: 7 additions & 20 deletions devtools/regl_codegen/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ var devtools = browserify(path.join(devtoolsPath, 'devtools.js'), {
// Start the server up!
server.listen(PORT);

var reglTraceList = getReglTraces();
var reglTraceList = [
'parcoords',
'scattergl',
'scatterpolargl',
'splom'
];

purgeGeneratedCode(reglTraceList);

// Build and bundle all the things!
Expand All @@ -91,25 +97,6 @@ function getMockFiles() {
});
}

function getReglTraces() {
return constants.allTraces.filter(function(trace) {
var indexPath = constants.pathToSrc + '/traces/' + trace + '/index.js';

// get categories
var indexContents = fs.readFileSync(indexPath, 'utf8');
var categories = indexContents.match(/^\s*categories:\s*\[([^\]]+)\]/m);
if(categories) {
categories = categories[1].split(',').map(function(c) {
return c.trim().replace(/^['"]|['"]$/g, '');
});
}

if(categories && categories.indexOf('regl') !== -1) {
return true;
}
});
}

function readFiles(files) {
var promises = files.map(function(file) {
var filePath = path.join(constants.pathToTestImageMocks, file);
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"parse-svg-path": "^0.1.2",
"polybooljs": "^1.2.0",
"probe-image-size": "^7.2.3",
"regl": "npm:@plotly/regl@^2.1.1",
"regl": "npm:@plotly/regl@^2.1.2",
"regl-error2d": "^2.0.12",
"regl-line2d": "^3.1.2",
"regl-scatter2d": "^3.2.8",
Expand Down
Loading

0 comments on commit a3ba6fa

Please sign in to comment.