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

Remove unnecessary dependencies (babel, lodash) #4

Open
comerc opened this issue Apr 13, 2016 · 7 comments
Open

Remove unnecessary dependencies (babel, lodash) #4

comerc opened this issue Apr 13, 2016 · 7 comments

Comments

@comerc
Copy link

comerc commented Apr 13, 2016

Please-please-please! :) It is not true way for package.

@seeekr
Copy link
Contributor

seeekr commented Apr 13, 2016

I'll consider removing lodash dependency since I don't depend on it much. But babel/ecmascript: nope, if that means I can't write the package code in ES6+ any more. If there is a way to use ES6+ and distribute only transpiled/ES5 code to users of this package, then that'd be alright. If you'd like to investigate, that'd be helpful.

Also, actually we also have a jquery dependency here that I failed to add. I'm not sure if I can remove that... (see https://github.com/themeteorites/blaze-magic-events/blob/master/events.js#L10 for why it's needed) Any ideas for how to solve that differently are welcome.

@comerc
Copy link
Author

comerc commented May 1, 2016

I know two packages with this feature w/o jQuery:

@comerc
Copy link
Author

comerc commented May 1, 2016

Oh-oh-oh

@comerc
Copy link
Author

comerc commented May 1, 2016

@comerc
Copy link
Author

comerc commented May 1, 2016

@seeekr
Copy link
Contributor

seeekr commented May 1, 2016

Hey @comerc! Thanks for the links! I've checked out only the last one so far, and I like what I see! I'm fairly confident now that I'll get rid of the jQuery dependency next time I'll work on this project.

Regarding the other dependencies:

For lodash I'll have to consider the options. As I see it, I can:
a) figure out if there are Meteor packages for each of the individual lodash methods that I need and depend on those,
b) find a way to write the code without using lodash without sacrificing (much) readability and maintainability (I really like using a functional style!)
c) implement my own tiny versions of the methods I've been using from lodash.
I'm not a fan of c). It might be that b) is the best option for a library/package as small as blaze-magic-events.

For babel this is what needs to be done:

  • figure out if including babel has any impact on the projects depending on this project at all -- basically it should not have, because babel is supposed to just transform my code and that's it; is that so?
  • provide a new version of the library using the new ecmascript package.

What I definitely will not do because it would be a silly thing is go back to pre-ES6 JS code. ES6+ is the way to go, even if it should have some impact on depending projects -- which, again, there should not be. Anyone who cares so super much that this would be an issue is free to just either fork this repo or inline their own version of this code into their project. :)

Just as an fyi -- I'm not really working a whole lot with Meteor in my current projects, so it might be some more weeks or so until I'll feel the need to work on this. PRs welcome, but if none come I should get around to this eventually.

In any case thanks for opening this issue and posting helpful stuff, keep it going if there's more!

Cheers

@brettg2
Copy link

brettg2 commented Apr 21, 2017

+1 !!!!

@seeekr seeekr changed the title Remove overhead relations (babel, lodash) Remove unnecessary dependencies (babel, lodash) Apr 22, 2017
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

3 participants