gulp-spritesmith icon indicating copy to clipboard operation
gulp-spritesmith copied to clipboard

Courtesy notice: gulp.spritesmith exists

Open twolfson opened this issue 11 years ago • 5 comments

This is a courtesy notice. It seems that you, @Otouto, and I wrote a grunt-spritesmith port at the same time. Since you are still developing gulp-spritesmith, it seems like you have not heard about my port. As a result, I am opening this issue to notify you mine exists.

https://github.com/twolfson/gulp.spritesmith

Do not feel required to halt development. Just be aware that mine exists. Feel free to close this issue.

twolfson avatar Feb 18 '14 10:02 twolfson

Hi, @twolfson. Generally, I dont want to produce similar plugins.

But, there is one feature that i need and your gulp-plugin miss it - groupBy param. If its specifed, plugin output a few sprites/styles files, please see readme in my repo. What do you think about implementation this in your plugin? If so, I just unpublish mine from npm. I can help with pull request.

Otouto avatar Mar 02 '14 14:03 Otouto

The documentation doesn't fully explain what the output of groupBy is. However, from what I can tell, it generates multiple spritesheets and CSS files from a single set of images. I would decline the request to do such.

spritesmith is built to do one thing well; generate a spritesheet. If someone wants to generate multiple files, then that should be the task of the containing script (composability over extensibility).

var groups = ['basic', 'green', 'light', 'dark'];
groups.forEach(function (group) {
  gulp.task('sprites-' + group, function () {
    gulp.src('./src/' + group + '/png/*.png')
        .pipe(tasks.spritesmith({
            imgName: 'sprite' + group + '.png',
            styleName: 'sprite' + group + '.css',
            imgPath: '../img/sprite' + group + '.png'
        }))
        .pipe(gulpif('*.png', gulp.dest('./dist/img/')))
        .pipe(gulpif('*.css', gulp.dest('./dist/css/')));
  });
});

gulp.task('sprites', groups.map(function (group) {
  return 'sprites-' + group;
}));

twolfson avatar Mar 03 '14 01:03 twolfson

+1 for deprecating this package. It's highly confusing...

andig avatar Jan 01 '15 14:01 andig

gulp-spritesmith wastes half of my day.Finally,I found gulp.spritesmith is what I want.

kevinfszu avatar Jun 05 '16 16:06 kevinfszu

Same here, lots of time wasted debugging ancient version of gm referenced through old version of spritesmith.

lambdafu avatar Nov 04 '16 11:11 lambdafu