fapprik/js-tricks.com — pull request #1 by fza (2014-11-04 14:52:48+00:00)
Title: Refactor Gulpfile

@rasshofer Could you review this one, please?

I managed to make the sprite generation more robust and were able to desynchronize the SCSS and sprite image generation/minification streams, as well as integrate it with the watcher in a fail-safe manner. I aimed to support multiple sprites, one of which only contains the images from one `source/images/sprite-*` folder, but also includes images stored in subfolders. Nonetheless each sprited image must end with `@[123]x.png$` in order to be considered.

The next task (I think) would be to run the sprite generation only when images that a sprite shall contain were added/removed/modified while the watcher inspects the filesystem. Currently, when any change within the `source/images` occurs, all sprites are regenerated. What would be the best way to just regenerate that one sprite which contains images that actually changed? Any ideas?