Skip to content

icegreentea/grideditor

Repository files navigation

Building

Build Command

npm run build

Format

The output of this project is a single file bundle appropiate for browser use. It will be usable in the browser with something like:

<script src="dist/core.js"></script>
<script>
    var grid = new lib.Grid()
</script>

The output format is IIFE exporting out the following classes:

  • Grid

Through use of global-name lib.

Notes

https://javascript.plainenglish.io/esbuild-library-6ec5fdb26e2c

Tests

npm install -D jest
// not sure how much I need these two...
npm install -D @types/jest ts-jest
// need this to build stuff properly for our tests...
npm install --save-dev esbuild-jest
// replace `test` script in package.json with `jest`

Run only single test:

npx jest -t "Test step size and clamping together"

Based on stuff from:

Debugging

  1. Find the test you (or code) you want to debug and add debugger inline
  2. Run isolated test with something like:
npx --node-options="--inspect-brk" jest -t "Test step size and clamping together" -i
  • --node-options="--inspect-brk"
    • Start inspector, and start automatic breakpoint
    • You can do --inspect to do without the automatic breakpoint
  • -t "Test step size and clamping together"
    • Regex/select the specific test to run
  • -i Same as --runInBand. Runs the inline (instead of using worker pool). Makes it easier to debug.
  1. Attach using a chromium based browser (can't use FF because its gecko based). Go to edge://inspect or chrome://inspect and click on Open dedicated DevTools for Node

Typescript and HTML Stuff

Resizeable Column Note:

https://webdevtrick.com/resizable-table-columns/

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published