sole / Animated_GIF

Javascript library for creating animated GIFs
https://sole.github.io/Animated_GIF
225 stars 53 forks source link

Use modules from npm, simplify build #30

Closed fregante closed 7 years ago

sole commented 8 years ago

Thanks for the PR! And sorry, I've been super busy these months. Let me have a look soon before merging-last time I worked on this I didn't know how to make this work properly with npm as I was a newbie 8-)

fregante commented 8 years ago

Ping

sole commented 8 years ago

Hi! thanks for the ping. I'm looking into this. I see that we use npm libraries such as neuquant. I remember specifically there being a bug that I fixed in my version: https://github.com/sole/Animated_GIF/blob/master/src/lib/NeuQuant.js#L28 <- see the note.

I'm going to see if the published version works or if it has the same issue, else maybe send a patch or something. I'll keep you updated... thanks again!

sole commented 8 years ago

I checked out your version, cleaned node_modules, did a fresh npm install and then npm run build and locally opened the tests/basic.html example to make sure everything matched the existing online version.

But it doesn't work, failing with an TypeError: NeuQuant is not a constructor.

screen shot 2016-05-23 at 14 22 00

Did I do something different from you? Did you try the new dist version? I might have missed something.

sole commented 8 years ago

No worries! It is going in the right direction and I'm grateful for that :-D

I think the most sensible thing to do is to change it to use the npm neuquant, and if there are colour bugs I will send a PR that corrects those, so we improve both this library and the other one. Sounds good? :D

And many thanks again!