In my own projects, I'm starting to explore using absolute URLs with no package manager and no bundling step.
I'd love to be able to import segseg directly in my projects. For example:
import segseg from 'https://cdn.jsdelivr.net/gh/tmpvar/segseg@0.2.2/segseg.js'
where the file would basically just look like:
export default function segseg (out, p1, p2, p3, p4) {
// ...
}
no legacy module systems, no window globals, just a plain old function that uses the new es module system. :)
A working example of this in one of my projects: https://cdn.jsdelivr.net/gh/mreinstein/collision-2d@master/src/segment-segment-overlap.js
In my own projects, I'm starting to explore using absolute URLs with no package manager and no bundling step.
I'd love to be able to import
segsegdirectly in my projects. For example:where the file would basically just look like:
no legacy module systems, no window globals, just a plain old function that uses the new es module system. :)
A working example of this in one of my projects: https://cdn.jsdelivr.net/gh/mreinstein/collision-2d@master/src/segment-segment-overlap.js