Closed alexander-akait closed 8 years ago
@twolfson sync
is not good solution it is slow then async, we have big build and async (speed) is very important
The example was sync but async can be used as well:
var glob = require('glob');
glob('path/to/files/*.png', function handleGlob (err, files) {
// If there was an error, handle it as desired
if (err) {
throw err;
}
// Call spritesmith
Spritesmith.run({
src: files,
...
}, function () { /* ... */ })
});
@twolfson I would like to have this opportunity to base, but if this is not feasible so sorry
It's an interesting thought but I think we should pass. It will break backwards compatibility with any files that contain a
*
in their name as well as add unnecessary code/dependencies. Someone can useglob
before passing alongsrc
tospritesmith
: