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

Modularize with ES2015 and rollupjs #913

Closed
wants to merge 38 commits into from
Closed

Modularize with ES2015 and rollupjs #913

wants to merge 38 commits into from

Conversation

tivac
Copy link
Contributor

@tivac tivac commented Dec 22, 2015

Decided to take a crack at the modularity dragon using ES2015 modules and rollupjs.

So here it is. This supports the entire current mithril API in theory, though there's a bunch of failing tests that I'll need to fix. Sending this to generate discussion and ensure this is an approach that is worth pursuing further.

I also cleaned up most of the ESLint issues in mithril.js during the process, but to keep from going crazy I modified the .eslintrc to make it better match the reality of the library. I'm not sure if those settings are aspirational or what but they seem totally at odds with the code as it is. In order to rewrite as little code as possible I've side-stepped that issue for now.

It's a little premature to talk end-user size, but after uglifying and gzipping this version of mithril ends up comparable in size to v0.2.2-rc1. 👍

TODO

  • Get sign-off that this is actually wanted
  • Fix 102 test failures
  • Integrate w/ Gruntfile, maybe? (I prefer it as an NPM script though)
  • Clean-up remaining ESLint/formatting issues
  • Flatten into a single commit
  • :shipit:

This is related to #651, #665, and #802.

@tivac
Copy link
Contributor Author

tivac commented Dec 22, 2015

(The test claiming it is passing is a lie, ignore it)

Plus a minor formatting fix.
@lhorie
Copy link
Member

lhorie commented Dec 22, 2015

To be honest, modularizing is something I'm doing w/ the rewrite, so I don't know if it's worth putting a lot of effort in modularizing the current codebase

@tivac
Copy link
Contributor Author

tivac commented Dec 22, 2015

Fair enough, I know I've asked before but I'd love to see your work on the rewrite! 😉

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

Successfully merging this pull request may close these issues.

2 participants