Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First of all, thanks for this awesome library!
Fixes #94
Adds a rollup config file to build ESM, CJS, and UMD bundles. Based on the source in src/fuzzysort.js.
Checks in the new esm file and the updated cjs and umd files.
Also updates the package.json to include
module
andbrowser
fields for the ESM and UMD bundles. This lets bundlers, node or CDN's know which version to use.I've tried to keep things fairly streamlined. Running 'test' automatically builds the files. The
src/fuzzysort.js
andfuzzysort.mjs
files are extremely similar, but that seemed better than the confusion of knowing which file in the root to edit and having rollup potentially overwrite your changes. I've also kept the build files checked in, to keep things simple. A nice future improvement I'm willing to contribute would be github actions CI and creating a PR when the files drift?