laoshu133 / grunt-css-sprite

A grunt plugin to help front engineer creating css sprite.
MIT License
65 stars 29 forks source link

Require 'gm' only when needed #2

Closed jsmarkus closed 10 years ago

jsmarkus commented 10 years ago

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.