Skip to content
Draft
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
7 changes: 4 additions & 3 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.2.0/schema.json",
"$schema": "https://biomejs.dev/schemas/2.5.5/schema.json",
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"files": {
"maxSize": 10000000,
Expand All @@ -17,6 +17,7 @@
"!**/stackgl_modules",
"!**/node_modules",
"!**/build",
"!**/.venv/**",
"!**/tasks/test_amdefine.js",
"!**/tasks/test_requirejs.js",
"!**/test/jasmine/assets/jquery-1.8.3.min.js"
Expand All @@ -25,9 +26,9 @@
"linter": {
"enabled": true,
"rules": {
"recommended": false,
"preset": "none",
"complexity": {
"noExtraBooleanCast": "error",
"noExtraBooleanCast": "off",
"noUselessCatch": "error",
"useLiteralKeys": "error",
"noAdjacentSpacesInRegex": "error"
Expand Down
19 changes: 10 additions & 9 deletions devtools/regl_codegen/server.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import ecstatic from 'ecstatic';
import fs from 'node:fs';
import http from 'node:http';
import path from 'node:path';
import { build } from 'esbuild';
import fs from 'fs';
import http from 'http';
import minimist from 'minimist';
import path from 'path';
import sirv from 'sirv';
import { localDevReglCodegenConfig as config } from '../../esbuild-config.js';
import constants from '../../tasks/util/constants.js';
import {
Expand All @@ -19,12 +19,13 @@ var PORT = args.port || 3000;

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

// Create server
var _static = ecstatic({
root: constants.pathToRoot,
cache: 0,
const _static = sirv(constants.pathToRoot, {
dev: true,
maxAge: 0,
gzip: true,
cors: true
setHeaders: (res) => {
res.setHeader('Access-Control-Allow-Origin', '*');
}
});

var tracesReceived = [];
Expand Down
2 changes: 1 addition & 1 deletion devtools/test_dashboard/devtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/* global Plotly:false */

var Fuse = require('fuse.js/dist/fuse.common.js');
var Fuse = require('fuse.js');
var mocks = require('../../build/test_dashboard_mocks.json');
var Lib = require('../../src/lib');

Expand Down
14 changes: 8 additions & 6 deletions devtools/test_dashboard/server.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ecstatic from 'ecstatic';
import http from 'node:http';
import { build, context } from 'esbuild';
import http from 'http';
import minimist from 'minimist';
import sirv from 'sirv';
import { devtoolsConfig, localDevConfig } from '../../esbuild-config.js';
import constants from '../../tasks/util/constants.js';
import { createMocksList, getMockFiles, readFiles, saveMockListToFile } from '../dashboard_utilities.mjs';
Expand All @@ -26,11 +26,13 @@ console.log('watching esbuild...');
await ctx.watch();

function devServer() {
const staticFilesHandler = ecstatic({
root: constants.pathToRoot,
cache: 0,
const staticFilesHandler = sirv(constants.pathToRoot, {
dev: true,
maxAge: 0,
gzip: true,
cors: true
setHeaders: (res) => {
res.setHeader('Access-Control-Allow-Origin', '*');
}
});

const server = http.createServer((req, res) => {
Expand Down
Loading
Loading