gulp-spritesmith
gulp-spritesmith copied to clipboard
Courtesy notice: gulp.spritesmith exists
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.
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.
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;
}));
+1 for deprecating this package. It's highly confusing...
gulp-spritesmith
wastes half of my day.Finally,I found gulp.spritesmith
is what I want.
Same here, lots of time wasted debugging ancient version of gm referenced through old version of spritesmith.