mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
build(copy-dist): simplify "copyNodeModuleFileOrFolder" copying
there's no benefit from stripping "node_modules/" from the string, to later add it again using the `DEST_DIR_NODE_MODULES` constant => just copy directly into the `DEST_DIR` folder and preserver the `node_modules` part in the path
This commit is contained in:
parent
ac3e96291a
commit
dbeae62709
@ -14,9 +14,7 @@ function log(...args: any[]) {
|
||||
}
|
||||
|
||||
async function copyNodeModuleFileOrFolder(source: string) {
|
||||
const adjustedSource = source.substring(13);
|
||||
const destination = path.join(DEST_DIR_NODE_MODULES, adjustedSource);
|
||||
|
||||
const destination = path.join(DEST_DIR, source);
|
||||
log(`Copying ${source} to ${destination}`);
|
||||
await fs.ensureDir(path.dirname(destination));
|
||||
await fs.copy(source, destination);
|
||||
|
Loading…
x
Reference in New Issue
Block a user