mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 03:29:02 +01:00 
			
		
		
		
	build(copy-dist): simplify "build" copying
there's no need to read the folder structure and then copy each single file in a loop => just copy the whole folder and be done with it :-)
This commit is contained in:
		
							parent
							
								
									9ac451e2b2
								
							
						
					
					
						commit
						ac3e96291a
					
				| @ -23,11 +23,8 @@ async function copyNodeModuleFileOrFolder(source: string) { | ||||
| } | ||||
| 
 | ||||
| const copy = async () => { | ||||
|     for (const srcFile of fs.readdirSync("build")) { | ||||
|         const destFile = path.join(DEST_DIR, path.basename(srcFile)); | ||||
|         log(`Copying source ${srcFile} -> ${destFile}.`); | ||||
|         fs.copySync(path.join("build", srcFile), destFile, { recursive: true }); | ||||
|     } | ||||
|     log(`Copying build into dist folder.`); | ||||
|     fs.copySync("./build", DEST_DIR); | ||||
| 
 | ||||
|     const assetsToCopy = new Set([ | ||||
|         "./images", | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Panagiotis Papadopoulos
						Panagiotis Papadopoulos