Closed vogdb closed 7 years ago
Don't forget to update docu! (to myself)
Hey @vogdb thanks for your multiple PR's! Will review asap.
Does this contain any backward incompatible changes?
Well, destroying now happens differently. We should trigger destroy.unveil
instead of just taking off listeners. The rest is compatible.
Dist version goes from ~2kb to ~3kb, which is a ~50% increase. Can these changes be compressed somehow?
I've reused unveil
const everywhere I could. Not sure about other parts. Logging can be definitely optimised if we move console.log
call to separate function. Is 3kb that painful?
@hongaar please look again
@vogdb Thanks, now merged!
Will remove the call to Sauce for now until I figure out what's tripping it up so we have a proper build status again :)
Concerning the filesize, it's easy to add code and difficult to remove code, so I think it's a good to critically consider each feature which adds weight to the resulting lib. It's just one dependency of probably several for most websites, and I always like it when I can keep vendor bytes down to a minimum.
As for the console.log calls, they're automatically removed in the dist version.
Thank you so much!
Depends on #27 Functionality to have multiple unveil instances on page and destroy unveil instance.