desandro / draggabilly

:point_down: Make that shiz draggable
https://draggabilly.desandro.com
MIT License
3.86k stars 386 forks source link

AMD support #6

Closed alejandroiglesias closed 11 years ago

alejandroiglesias commented 11 years ago

Is there any chance of AMD support coming?

desandro commented 11 years ago

I have no official plans, but yes I would like to support AMD / Require.js, but I don't want to be exclusively AMD. I am open to PR for this issue.

This is a bit tricky with this library as it has its own dependencies, so I need a clean way to do dependencies with both AMD and window.dependency.

alejandroiglesias commented 11 years ago

I recommend you to follow the UMD (Universal Module Definition) patterns. Seems to work well with both AMD, CommonJS and global fallback.

alejandroiglesias commented 11 years ago

Thanks pal!