You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.
log.error(`Can't find base of ${newLocationBase} of ${file}`);
return;
}else{
constnewFileLocation=path.join(root,s[1]);
ensureDir(path.dirname(newFileLocation));
awaitwriteFile(newFileLocation,readFiles[file]);
}
}
}
It appears the logic for resource files got put into the core logic for sparky, so now it is only capable of saving files in folders with their filetype name.
This line in particular is where the bug happens:
// join root and the file extension to create a folder such as dist/png or dist/svg
const newFileLocation = path.join(root, s[1]);
This line is also buggy:
// only files that have an extension are capable of being copied?
if (!s[1]) {
log.error(`Can't find base of ${newLocationBase} of ${file}`);
Also, it doesn't appear the filename ever gets added back to the folder its being put in:
// newFileLocation is just dist/png. It still hasn't had the actual filename appended??
await writeFile(newFileLocation, readFiles[file]);
The text was updated successfully, but these errors were encountered:
By using a dot, I was splitting the filename from the file extension.
I'm leaving this issue open but changing the name. sparky().dest("./dist", "./assets") should probably be interpreted as changing the destination from whatever it is in assets to whatever it is in dist.
SephReed
changed the title
Fix Spark newLocation && newLocationBase logic
Sparky().dest() does not interpret its arguments as relative paths.
Nov 16, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
#1808
I figured out what was causing the issue. This comment can be skipped, but has been left to show the work.
Sparky has some messed up logic around saving files in new locations:
fuse-box/src/sparky/sparky_chain.ts
Lines 39 to 56 in fe10bf4
It appears the logic for resource files got put into the core logic for sparky, so now it is only capable of saving files in folders with their filetype name.
This line in particular is where the bug happens:
This line is also buggy:
Also, it doesn't appear the filename ever gets added back to the folder its being put in:
The text was updated successfully, but these errors were encountered: