tasks/spritesheet.js
function mkSprite(srcFiles, destImage, options, callback) {
		
		options.src = srcFiles,

		grunt.verbose.writeln('Options passed to Spritesmth:', JSON.stringify(options));

		spritesmith(options, function(err, result) {
			// If an error occurred, callback with it
			if (err) {
				grunt.fatal(err);
				return;
			}

			// Otherwise, write out the result to destImg
			var destDir = path.dirname(destImage);
			grunt.file.mkdir(destDir);
			fs.writeFileSync(destImage, result.image, 'binary');

			grunt.log.writeln(destImage, 'created.');

			callback(result.coordinates);
		});
	}
function mkSprite(srcFiles, destImage, options, callback) {
		
		options.src = srcFiles,

		grunt.verbose.writeln('Options passed to Spritesmth:', JSON.stringify(options));

		spritesmith(options, function(err, result) {
			// If an error occurred, callback with it
			if (err) {
				grunt.fatal(err);
				return;
			}

			// Otherwise, write out the result to destImg
			var destDir = path.dirname(destImage);
			grunt.file.mkdir(destDir);
			fs.writeFileSync(destImage, result.image, 'binary');

			grunt.log.writeln(destImage, 'created.');

			callback(result.coordinates);
		});
	}
Create an image from `srcFiles`, with name `destImage`, and pass coordinates to callback.