geotiffjs / geotiff.js

geotiff.js is a small library to parse TIFF files for visualization or analysis. It is written in pure JavaScript, and is usable in both the browser and node.js applications.
https://geotiffjs.github.io/
MIT License
878 stars 183 forks source link

Convert package to "module", make source ESM, fix worker test #228

Closed manzt closed 3 years ago

manzt commented 3 years ago

Not as comprehensive as #227, but another option to think about. This PR changes the source to node-compatible ESM, meaning that tests can be run in ESM (no need to @babel/register with mocha). It fixes the issue with the Worker tests failing.

EDIT: I closed #227 in favor of this PR. It would be great to have an browser ESM bundle, but this PR offers a smaller step in that direction. See #227 for more details about the motivation for ESM.