-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revisit dependencies and add browser ready build #112
Conversation
script (reusing flummox's one) so that we can output a dist-ready version of it. Fixes reduxjs#115. Fixes reduxjs#88.
I'm going to look at this in a few days, really busy at the moment. Thanks a lot! |
Happy to help :) I've updated the PR's original message to better reflect what it's doing |
don't sure we need |
@chicoxyzzy this PR removes it. It depends on Symbols I guess then :) |
👍 than :) |
I see a lot of lodash code there. Weird. Are we using deep equality somewhere? Thanks! |
I'm -1 on pushing
However adding |
I'm with @ooflorent here, let's put |
Good :) Will do that later on today On Wed, Jun 17, 2015 at 12:18 PM Dan Abramov [email protected]
|
👍 |
Thanks! Can you also please generate the module tree and check which Lodash modules drag the most dependencies? |
I wrote some quick utils to replace
|
@frankychung Great! Let's replace Lodash's way-too-smart function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(result[key]);
}, {});
} (written in browser, might be wrong :-) |
I made some changes to yours to make all the tests pass: function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
} |
Oh right. @frankychung Can I ask you to submit a separate PR just for this change? The function should be put into |
@frankychung's change does bring the size down considerably :).
Without it:
That's a clear win :). Here's a rough
Then, for As is:
Without
Thoughts? |
@frankychung while looking back into the comments I realised I missed this:
Are you submitting |
@dariocravero Sure, I'll open another PR for my implementations (and quickly replace identity) |
My 2 cents on dist: there's some benefit in putting it on github, if not this repo then some other repo, just so you can take advantage of cdn.rawgit Keeping it out of this repo is good though, it just adds noise to every PR. |
@goatslacker @ooflorent's proposal was to push it to cdnjs when published to npm. I'll wait for @frankychung's PR (thanks:)) it land and I'll fix this one to remove any unused dependencies for good :). |
Superseded by #142. |
This PR:
package.json
by removing the unusedbrowserify
section;envify
andbabel-runtime
as they aren't being used;redux
that can be used in a browser directly, put into a cdn, into a live playground :), etc. @acdlite is there any specific reason whyflummox
doesn't save (nor ignore on .gitignore)dist/
?Regarding sizes, we're looking at
56k
for a regular build and~12k
for a minified one, when gzipped it's a bit below4k
! Pretty impressive! :)