jeremyckahn / shifty

The fastest TypeScript animation engine on the web
https://jeremyckahn.github.io/shifty/doc/
MIT License
1.54k stars 88 forks source link

any plans for AMD support? #15

Closed millermedeiros closed 12 years ago

millermedeiros commented 12 years ago

I'm using it on a project where I don't want to generate any globals.

the UMDJS repository contains different ways of exporting it.

just asking before I implement it..

jeremyckahn commented 12 years ago

It would be a welcomed feature, but I have no immediate plans to implement AMD support. Feel free to build it in and make a Pull Request, it would be greatly appreciated.

millermedeiros commented 12 years ago

cool, I should do it in a few days..

millermedeiros commented 12 years ago

just realized one issue with the UMD approach... since shifty has many different plugins and the build script is concatenating all of them into the same file the built file won't work on a AMD environment unless we use named modules (bad for portability) and it won't work on nodejs (since it needs to require something that is on the same file)

maybe the solution will be to increase the complexity of the build.sh file to generate different wrappers based on the environment - use a simple IIFE for browser and don't concat files for nodejs and AMD.

jeremyckahn commented 12 years ago

(Not sure why this issue shows up as "open" for me, closing it now)

To paraphrase related discussions, the files in /src do not need to be built as modules, as they will be turned into UMD modules by the build script, once it's rewritten.