Skip to content

Commit

Permalink
feat: Upgrade dgrid2 to v3
Browse files Browse the repository at this point in the history
Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Nov 11, 2024
1 parent 8f35244 commit 6312202
Show file tree
Hide file tree
Showing 17 changed files with 404 additions and 246 deletions.
100 changes: 98 additions & 2 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 @@ -20,7 +20,7 @@
"xpackages/deck-shim",
"packages/dgrid",
"packages/dgrid-shim",
"xpackages/dgrid2",
"packages/dgrid2",
"xpackages/eclwatch",
"packages/esbuild-plugins",
"xpackages/form",
Expand Down
2 changes: 1 addition & 1 deletion packages/chart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"test": "vitest run",
"coverage": "vitest run --coverage",
"update": "npx --yes npm-check-updates -u -t minor",
"update-major": "npx -yes npm-check-updates -u"
"update-major": "npx --yes npm-check-updates -u"
},
"dependencies": {
"@hpcc-js/api": "^3.1.0",
Expand Down
66 changes: 26 additions & 40 deletions packages/dgrid2/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,61 +1,47 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Dev",
"type": "chrome",
"name": "test-browser",
"type": "msedge",
"request": "launch",
"url": "file:///${workspaceRoot}/index.html",
"runtimeArgs": [
"--allow-file-access-from-files",
"--disable-web-security"
"url": "http://localhost:8888",
"webRoot": "${workspaceFolder}",
"outFiles": [
"${workspaceFolder}/**/*.js",
"!**/node_modules/**"
],
"webRoot": "${workspaceRoot}"
},
{
"name": "index.html (vite)",
"type": "pwa-msedge",
"request": "launch",
"url": "http://localhost:3000/index.html",
"webRoot": "${workspaceRoot}",
"preLaunchTask": "serve-vite",
"postDebugTask": "Terminate All Tasks"
},
{
"name": "lws",
"type": "chrome",
"name": "test-node",
"type": "node",
"request": "launch",
"url": "http://localhost:8080/../packages/graph/index.html",
"runtimeArgs": [
"--allow-file-access-from-files",
"--disable-web-security"
"run-script",
"test-node"
],
"webRoot": "${workspaceRoot}"
},
{
"type": "chrome",
"request": "launch",
"name": "index.md",
"url": "${workspaceFolder}/../../website/index.html?debug=1#packages/graph/docs/index.md",
"runtimeArgs": [
"--allow-file-access-from-files",
"--disable-web-security"
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"outFiles": [
"${workspaceFolder}/**/*.js",
"!**/node_modules/**"
],
"webRoot": "${workspaceFolder}/../../website"
},
{
"type": "chrome",
"name": "index.html",
"request": "launch",
"name": "http index.md",
"url": "http://localhost:8080/${workspaceFolder}/../../website/index.html?debug=1#packages/graph/docs/index.md",
"type": "msedge",
"url": "file:///${workspaceFolder}/index.html",
"runtimeArgs": [
"--allow-file-access-from-files",
"--disable-web-security"
],
"webRoot": "${workspaceFolder}/../../website"
"webRoot": "${workspaceFolder}",
"outFiles": [
"${workspaceFolder}/**/*.js",
"!**/node_modules/**"
]
}
]
}
60 changes: 10 additions & 50 deletions packages/dgrid2/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,76 +1,36 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "gen-types-watch",
"type": "npm",
"label": "compile umd watch",
"script": "compile-umd-watch",
"problemMatcher": [],
"presentation": {
"group": "group-build"
}
},
{
"type": "npm",
"label": "compile es6 watch",
"script": "compile-es6-watch",
"problemMatcher": [],
"script": "gen-types-watch",
"problemMatcher": [
"$tsc-watch"
],
"presentation": {
"group": "group-build"
}
},
{
"label": "bundle-watch",
"type": "npm",
"label": "bundle watch",
"script": "bundle-watch",
"problemMatcher": [],
"presentation": {
"group": "group-build"
}
},
{
"label": "serve-vite",
"type": "npm",
"script": "serve-vite",
"problemMatcher": {
"owner": "node",
"fileLocation": [
"relative",
"${workspaceFolder}"
],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
},
"background": {
"activeOnStart": true,
"beginsPattern": "^ vite",
"endsPattern": "^ ready in "
}
},
"presentation": {
"group": "group-build"
},
"isBackground": true
},
{
"label": "build-local-dev-server",
"label": "build",
"dependsOn": [
"compile umd watch",
"compile es6 watch",
"bundle watch",
"gen-types-watch",
"bundle-watch",
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
}
}
]
}
29 changes: 29 additions & 0 deletions packages/dgrid2/esbuild.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { browserTpl } from "@hpcc-js/esbuild-plugins";
import pkg from "./package.json" with { type: "json" };

// config ---
await Promise.all([
browserTpl("src/index.ts", "dist/index", {
keepNames: true,
alias: {
"d3-array": "@hpcc-js/common",
"d3-brush": "@hpcc-js/common",
"d3-collection": "@hpcc-js/common",
"d3-color": "@hpcc-js/common",
"d3-dispatch": "@hpcc-js/common",
"d3-drag": "@hpcc-js/common",
"d3-dsv": "@hpcc-js/common",
"d3-ease": "@hpcc-js/common",
"d3-format": "@hpcc-js/common",
"d3-interpolate": "@hpcc-js/common",
"d3-scale": "@hpcc-js/common",
"d3-selection": "@hpcc-js/common",
"d3-time-format": "@hpcc-js/common",
"d3-transition": "@hpcc-js/common",
"d3-zoom": "@hpcc-js/common"
},
external: [
...Object.keys(pkg.dependencies),
]
})
]);
16 changes: 0 additions & 16 deletions packages/dgrid2/index.css

This file was deleted.

Loading

0 comments on commit 6312202

Please sign in to comment.