mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
build(copy-dist): execute code in try/catch -> get rid of function
since we don't export this anywhere, might as well just call the steps directly
This commit is contained in:
parent
d75cf8c11e
commit
3032156b45
@ -18,7 +18,8 @@ function copyNodeModuleFileOrFolder(source: string) {
|
||||
fs.copySync(source, destination);
|
||||
}
|
||||
|
||||
const copy = async () => {
|
||||
try {
|
||||
|
||||
log(`Copying build into dist folder.`);
|
||||
fs.copySync("./build", DEST_DIR);
|
||||
|
||||
@ -99,8 +100,8 @@ const copy = async () => {
|
||||
for (const nodeModuleItem of [...nodeModulesFile, ...nodeModulesFolder]) {
|
||||
copyNodeModuleFileOrFolder(nodeModuleItem);
|
||||
}
|
||||
};
|
||||
console.log("Copying complete!")
|
||||
|
||||
copy()
|
||||
.then(() => console.log("Copying complete!"))
|
||||
.catch((err) => console.error("Error during copy:", err));
|
||||
} catch(err) {
|
||||
console.error("Error during copy:", err)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user