greensock / GSAP

GSAP (GreenSock Animation Platform), a JavaScript animation library for the modern web
https://gsap.com
19.83k stars 1.72k forks source link

gsap plugins with webpack #118

Closed geddski closed 9 years ago

geddski commented 9 years ago

I'm using webpack with Greensock. I'm able to npm install gsap, and require() it with webpack. I need to do the same thing for Draggable, but it doesn't appear to be a part of the gsap module.

jackdoyle commented 9 years ago

Sorry, we're not very familiar with WebPack and we're super busy working on some exciting new features. I wonder if maybe you just pointed at the wrong file/directory? Remember, Draggable is in the /utils/ directory.

pospi commented 9 years ago

You just need to use the relative path within the GSAP module to load the Draggable file:

require('gsap/src/uncompressed/utils/Draggable');

I do this once in my main (clientside) script entrypoint. Hope that helps!

jackdoyle commented 9 years ago

Thanks @pospi