matiasgali / guillotine

jQuery plugin to crop images within an area (fully responsive), allowing to drag (touch support), zoom and rotate.
http://guillotine.js.org
326 stars 100 forks source link

Making plugin adhere to UMD #25

Closed jonathanwkelly closed 9 years ago

jonathanwkelly commented 9 years ago

Wrapping plugin to adhere to https://github.com/umdjs/umd/blob/master/jqueryPluginCommonjs.js

matiasgali commented 9 years ago

Hi @jonathanwkelly, thanks for contributing!

First of all, keep in mind that the source code is the CoffeeScript file in the src folder so changes should be made there and then generate the js from it.

In my opinion adding AMD support at this point wouldn't be necessarily a step forward, it might be wiser to add just CommonJs support. And given that this particular plugin doesn't make any sense on server side it might be unnecessary too, with the possible exception of Browserify and the like.

Anyway, in general it's quite easy for anyone to bundle the plugin for her preferred module system and ES6 is in the horizon so I think that for now it would be better to stick with a vanilla jQuery plugin and give the developers the freedom to wrap it in whatever environment they want.