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.
This change adds a webpack build configuration which will create a UMD module of json2csv in the
dist/
directory. It's ignored by git, but isn't ignored by npm, so it will be available when downloaded via npm.I've updated the README as well.
Now
dist/json2csv.js
can be included with an HTML script tag, if the user is unable to work with javascript modules. All dependencies are included. I don't like this that much, but I'm in a situation where adding webpack or another module packer to the project I'm working on would mean a ton of refactoring. And no other JSON -> CSV String package I've found (that isn't module-only) will let me specify a field order.NOTE: If this is going to be distributed via npm, it's important that
npm run build
is run before every release, ordist/json2csv.js
will be unavailable or out-of-date.