gulp-css-spriter icon indicating copy to clipboard operation
gulp-css-spriter copied to clipboard

Conditional spriting based on image url

Open linxiaowu66 opened this issue 8 years ago • 3 comments

Add an option to conditionally filter images based on the image URL

For example, any image with ?__spriter will be sprited

background-image: url('./images/test.png?__spriter');

linxiaowu66 avatar Feb 14 '17 08:02 linxiaowu66

Just in case you weren't aware and for people who stumble onto this issue. You can already conditionally render images with comments with some meta info in them, see https://github.com/MadLittleMods/gulp-css-spriter#meta-info

MadLittleMods avatar Feb 15 '17 17:02 MadLittleMods

@xing-zhi We should make this a more general option for a matching function or regex, options.filter(uri, filePath)

https://github.com/MadLittleMods/gulp-css-spriter/pull/11

MadLittleMods avatar Feb 15 '17 17:02 MadLittleMods

@MadLittleMods Thanks a lot.

linxiaowu66 avatar Feb 16 '17 02:02 linxiaowu66