variable in the image's source isn't allowed?
aleodev opened this issue · 1 comments
aleodev commented
When I try to add a variable to the files parameter or add a query string to it, it gives me the error that no files have been specified. For example, using uuid inside of the files path wouldn't work.
// doesn't work
var UUID = uuidv4()
var UUIDPATH = `server/assets/${UUID}/*.jpeg`
spritesheet(UUIDPATH, {format: 'json', path: 'server/assets/test/'}, function (err) {
if (err) throw err;
console.log('spritesheet successfully generated');
});
// doesn't work
var UUID = uuidv4()
spritesheet(`server/assets/${UUID}/*.jpeg`, {format: 'json', path: 'server/assets/test/'}, function (err) {
if (err) throw err;
console.log('spritesheet successfully generated');
});
//doesn't work
var UUID = uuidv4()
spritesheet('server/assets/'+UUID+'/*.jpeg', {format: 'json', path: 'server/assets/test/'}, function (err) {
if (err) throw err;
console.log('spritesheet successfully generated');
});
kperwel commented
I'm missing the point of using unique id in image source path. It does not matter how You will create path, as long as it is correct.