Skip to content

Bundling Improvements

Compare
Choose a tag to compare
@Rami-Sabbagh Rami-Sabbagh released this 19 Jul 22:10

Improvements

  • Add ES modules support, which allows for tree shaking.
  • CommonJS support is still included.
  • The module minzipped size is now down to 1.4 KB.
  • Reached code quality A+ on Codefactor.
  • Achieved 100% code coverage.
  • More suitable for browsers usage.

Breaking changes

  • Removed loadAndExtractMarksFromDocument, because it's causing the pdfjs-dist dependency, and not suitable for the browser.
  • Users should now import pdfjs-dist on and load the document on their own.

Miscellaneous

  • Remove pdfjs-dist from the dependencies, and make it a dev dependency instead.
  • Updated the examples in README.md to include how to load the documents using pdfjs-dist.
  • Added Jest for unit testing, the module is now tested with 100% coverage as reported by Codecov.
  • Added eslint for linting the source code.