Griddle icon indicating copy to clipboard operation
Griddle copied to clipboard

Use Lodash Instead of Underscore

Open blkmutt opened this issue 10 years ago • 11 comments

Just use necessary modules from lodash instead of including underscore. See this issue for details. https://github.com/meteor/react-packages/issues/168

blkmutt avatar Jan 20 '16 17:01 blkmutt

Yea we should do this :+1: We will need to include just the methods from lodash that we want to use just like we are in 1.0.

If anyone wants to take a stab at this that'd be good -- Otherwise, I'll try to get to it soon. Basically we want to do something like this:

var debounce = require(lodash.debounce);

Anywhere that we were using _.debounce it should use the newly imported module instead (I don't think we're using debounce here but just an example :smiley:).

I think we should bump the version to 0.4.0 after this also.

ryanlanciaux avatar Jan 20 '16 18:01 ryanlanciaux

I will do this change. Seems great.

yorchv avatar Jan 21 '16 06:01 yorchv

Thank you! That would be awesome! :+1:

ryanlanciaux avatar Jan 21 '16 11:01 ryanlanciaux

@ryanlanciaux I have been able to update the package successfully, the only problem is about the documentation. Should we make the lodash modules as dependencies instead of peerDeps? This removes the need to have underscore installed or available.

yorchv avatar Jan 21 '16 18:01 yorchv

Awesome news! I think it's fine to make them actual dependencies and remove underscore entirely :+1:

ryanlanciaux avatar Jan 21 '16 18:01 ryanlanciaux

Check https://github.com/GriddleGriddle/Griddle/pull/325

yorchv avatar Jan 21 '16 19:01 yorchv

Thanks so much -- I'll try to get that merged in the next day or so here and publish this out.

ryanlanciaux avatar Jan 21 '16 19:01 ryanlanciaux

plans on merging this?

yorchv avatar Jan 27 '16 18:01 yorchv

Yes -- sorry about the delay. I was going to try to rebase it on top of master but if you want to do that also that would be good -- it's finding conflicts (which is odd because I don't think we merged anything between start and finish of this task)

Thanks a ton for checking in on this -- it's an awesome thing and def. something that should be merged in.

ryanlanciaux avatar Jan 27 '16 18:01 ryanlanciaux

Done

yorchv avatar Jan 27 '16 18:01 yorchv

This is in 0.4.0 - thanks again @yorchv and sorry about the delay in making it a released version!

ryanlanciaux avatar Mar 15 '16 13:03 ryanlanciaux