Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Courtesy notice: gulp.spritesmith exists #3

Open
twolfson opened this issue Feb 18, 2014 · 5 comments
Open

Courtesy notice: gulp.spritesmith exists #3

twolfson opened this issue Feb 18, 2014 · 5 comments

Comments

@twolfson
Copy link

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.

@Otouto
Copy link
Owner

Otouto commented Mar 2, 2014

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.

@twolfson
Copy link
Author

twolfson commented Mar 3, 2014

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;
}));

@andig
Copy link

andig commented Jan 1, 2015

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

@kevinfszu
Copy link

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

@lambdafu
Copy link

lambdafu commented Nov 4, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants