mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +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);
|
fs.copySync(source, destination);
|
||||||
}
|
}
|
||||||
|
|
||||||
const copy = async () => {
|
try {
|
||||||
|
|
||||||
log(`Copying build into dist folder.`);
|
log(`Copying build into dist folder.`);
|
||||||
fs.copySync("./build", DEST_DIR);
|
fs.copySync("./build", DEST_DIR);
|
||||||
|
|
||||||
@ -99,8 +100,8 @@ const copy = async () => {
|
|||||||
for (const nodeModuleItem of [...nodeModulesFile, ...nodeModulesFolder]) {
|
for (const nodeModuleItem of [...nodeModulesFile, ...nodeModulesFolder]) {
|
||||||
copyNodeModuleFileOrFolder(nodeModuleItem);
|
copyNodeModuleFileOrFolder(nodeModuleItem);
|
||||||
}
|
}
|
||||||
};
|
console.log("Copying complete!")
|
||||||
|
|
||||||
copy()
|
} catch(err) {
|
||||||
.then(() => console.log("Copying complete!"))
|
console.error("Error during copy:", err)
|
||||||
.catch((err) => console.error("Error during copy:", err));
|
}
|
Loading…
x
Reference in New Issue
Block a user