Wikia/app — pull request #5400 by BladeBronson (2014-11-19 02:10:45+00:00)
Title: VE-1669: Fix preview for vignette

VE media preview is not working for images on wikis where vignette thumbnailing is enabled (any wiki with the new media gallery enabled in Labs).

The Mercury team wrote a vignette library with AMD and vanilla JS outputs: https://github.com/Wikia/vignette-js. Because this AMD output does not use context.define to name the module, it can't be used with modil (our AMD loader). It also isn't formatted to be used with ResourceLoader.

VisualEditor is the first product to use this vignette library on our current stack, so I am only loading it as a script in the VE init. Another option would be to load this as a dependency of the skin for more widespread use.

I'm seeking code review from @Wikia/platform-team