export source for node and unminified for browser #151
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.
Hi,
over at Mocha we're looking to add support for parallel testing (mochajs/mocha#4245), and I've chosen
workerpool
to help manage this for us.I noticed when debugging that this project is shipping a
.min.js
file to Node.js users. This isn't necessary, and can make debugging awkward.This PR changes the main export in Node.js to be the source entry point:
src/index.js
. I've added thebrowser
field to point todist/workerpool.min.js
.Also:
Those building browser apps will often do their own minification. For those apps which do not, it can make sense to ship a minified version--but it doen't need to be the main export. I have not changed the default browser export to
dist/workerpool.js
(which it likely should be) because it too needs a source map (pointing back to the files insrc/
), and I wasn't sure how to configure that in the gulpfile.