Skip to content
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

Unpack the main-unminified.js bundle into separate module files #28

Open
JonathonDunford opened this issue Mar 27, 2018 · 1 comment
Open

Comments

@JonathonDunford
Copy link
Member

Issue by activescott
Saturday Mar 17, 2018 at 20:24 GMT
Originally opened as https://github.com/forkdelta/forkdelta.github.io/issues/130


I believe we can iteratively unpack that 153,953 line file ($#@!$@) into it's respective module files again. This would do wonders for making the codebase maintainable and potentially a sane base for the next-gen-ui.

I think I'll take a whack at this and see if I can get into it and see a light at the end of the tunnel.

@JonathonDunford
Copy link
Member Author

Comment by activescott
Sunday Mar 18, 2018 at 06:27 GMT


I think it is quite possible. See branch referenced above for a script that will unpack main-unminified.js. I'm sure it's not going to work just immediately, but I'm optimistic with some trial & error after the unpack we can get it all working again without the 150K file anymore.

Some known things that need done:

  • Setup a bundler to pack jsapp/app.js module with webpack, rollupjs, browserfy, or something (after moving scripts/unpacked_modules/* jsapp/.
  • I did some hacky name mangling in filterPreferredModuleNames in the script to avoid obsessive duplication of modules. Technically it may not be absolutely necessary (modules would just be loaded multiple times?), and I fear I may have mangled some of the original paths.
  • As expected there are TONS of public packages/modules in the unpacked_modules so an extraordinary amount of removal of files and replacing with npm modules could be done. Some that I remember seeing: react, bignumber, crypto, lodash, browserfy, buffer, qs, punycode, sha1, sha256, aws, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant