laoshu133/grunt-css-sprite — pull request #2 by jsmarkus (2014-03-04 11:15:15+00:00)
Title: Require 'gm' only when needed

For now `gm` module dependency is mandatory. As far as i know, installing `graphicsmagic` under Windows is not a trivial task. It requires external header files, or something like that. However, it should be an option to use `pngsmith` for building sprites on those Windows machines, where it is impossible (or undesirable) to compile `graphicsmagic` library. On the other hand `gm` is not needed every time - it's just mandatory when sprites for retina display are being processed.

So I decided to require `gm` on-demand. It gives a possibility to not use native C++ modules at all when retina images are not used.