Create default way to minify and add umd wrapper #42
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.
Saw you reverted the
module.exports
, agree that that was probably the best to do, since it didn't support all use cases.This pull request adds an umd wrapper, that should work with bower/amd/commonjs, more information in http://bob.yexley.net/umd-javascript-that-runs-anywhere/ .
I also added a standardized way to create the minified file, since it wasn't documented how to generate that file.
Github doesn't handle whitespace changes very smartly, so this is the actual diff to the
radar-chart.js
file, reproducible with this command:git diff --ignore-all-space dc53d2cb1682c37a35c6751a6363c08d244b4148
Minifying now works by running
npm install && npm run minify
.