MadLittleMods / gulp-css-spriter

Sprite Sheet Generation from CSS source files. The best and different approach to sprite sheets.
https://www.npmjs.com/package/gulp-css-spriter
38 stars 19 forks source link

Images appear multiple times in the spritemap, when multiple chunks fed in with the same image #2

Closed MadLittleMods closed 9 years ago

MadLittleMods commented 9 years ago

The example will produce a image,spritesheet.png, that will have two instances of aenean-purple.png.

This seems to be a bug introduced in v0.3.0.

gulp.task('sprite', function() {

    // './test-css/minimal-for-bare-testing.css'
    return gulp.src(['./test1.css', './test2.css'])
        .pipe(spriter({
            'includeMode': 'implicit',
            'spriteSheet': './spritesheet.png',
        }));
});

test1.css:

.aenean
{
    width: 120px;
    height: 100px;
    background: url('../test-images/aenean-purple.png');
}

test2.css:

.aenean2
{
    width: 120px;
    height: 100px;
    background: url('../test-images/aenean-purple.png');
}