-
Notifications
You must be signed in to change notification settings - Fork 517
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
Reduce dependency size #844
Conversation
the minified files are 17 Mb, which makes installing ripple-lib slower than it should be. those that want to include the minified files in their website should be able to build them and copy the compiled files over
I was just thinking that this needed to be improved. Thank you! Specifically, I noticed that the files in
Should we remove these lines? |
Awesome idea! Right now As far as I'm counting 5 different bundled builds in |
Also, adding/removing For |
Thanks for those insights @FredKSchott ! I agree - I think we should put I'm in favor of just 2 bundled builds for the browser. I don't know what's different about the "debug" build.. will have a look at that later. |
It looks like the debug build keeps most of the code as-is, while the normal build puts each file into a single line that gets Using present-day naming conventions: |
What do you think about publishing those builds as a separate module? I don't think you'll ever want the packed and unpacked versions in the same project, and those files are pretty large because they also bundle all of the dependencies. |
@emschwartz That's a good point. Now that we specify the browser-compatible shim for Do you know of some other JS library that does something similar (so that we can follow their convention)? |
- `"bin/*"`, `"test/*"`, and `"Gulpfile.js"` can be removed - See #844
+1 for publishing the bundled lib separately, I know babel does this to some degree of success: https://www.npmjs.com/package/@babel/standalone It will probably take some work to set up for ripple-lib, babel uses lerna to manage multiple packages in one repo but that's probably overkill for what we need. |
This was fun to go back and re-read :) I'm not sure if this specific PR is still actionable, safe to close or spin off into an "improve perf" issue? /cc @intelliot |
@FKSRipple Good question. I'll close this PR for now, replacing it with #1057 , which does nearly the same thing. Anyone should feel free to open a new issue or PR if there's more (or something different) that should be done. |
ripple-lib
is quite a large dependency right now, in part because it includes some unnecessary files like tests and minified versions of the library. There's probably more that could be done to reduce the size (for example, the other ripple modules likeripple-address-codec
also include tests in the published npm package), but this should be a start.Related to interledgerjs/moneyd#10