greensock / GSAP

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

EasePack.min.js references TweenLite.js in wrong directory #133

Closed TomBaxter closed 8 years ago

TomBaxter commented 8 years ago

Full disclosure. I am not a JavaScript guy. But ran into this error while building a development Environment.

ERROR in ./~/gsap/src/minified/easing/EasePack.min.js Module not found: Error: Cannot resolve 'file' or 'directory' ../TweenLite.js in /home/tkb/work/venv/cos/osf/osf.io/node_modules/gsap/src/minified/easing @ ./~/gsap/src/minified/easing/EasePack.min.js 12:5032-5058

I think the last line of minified/easing/EasePack.min.js should reference TweenLite.min.js instead of TweenLite.js .

Thanks, Tom

TomBaxter commented 8 years ago

Or if TweenLite.js is correct then the path needs to be ../../uncompressed ?

jackdoyle commented 8 years ago

No, not that I can tell. ../TweenLite.js is correct. It's one directory up.

TomBaxter commented 8 years ago

@jackdoyle Ok, I guess I'm just not getting it. TweenLite.min.js is up one directory from EasePack.min.js , but not TweenLite.js .

This is the last line of src/minified/easing/EasePack.min.js

"function"==typeof define&&define.amd?define(["TweenLite"],a):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=a())}();

src/minified contains only .min.js no .js

Maybe I'm not understanding how the pathing works, but the *.js files are in src/uncompressed which would be ../../uncompressed from src/minified/easing .

Please help me understand what I'm missing.

Thanks, Tom

jackdoyle commented 8 years ago

No no, you'd just use the stuff inside /uncompressed/. That way, all the paths are correct. It sounds like the confusion in your case is that you're plugging into the /minified/ version(s). The proper way to do it is use the uncompressed stuff during production and just have a minification task as part of your build process (that's very common). Easier debugging and faster loading for the end user.

TomBaxter commented 8 years ago

@jackdoyle Thanks for spending the time to set me straight. I think I get it now. And thanks for this library as well.

Cheers, Tom

jackdoyle commented 8 years ago

No problem at all, Tom. Happy to help!