mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	build(copy-dist): consolidate files and folder copying into one asset copying job
there's no benefit in having them split up like before
This commit is contained in:
		
							parent
							
								
									dbc2df0820
								
							
						
					
					
						commit
						9ac451e2b2
					
				| @ -29,32 +29,26 @@ const copy = async () => { | |||||||
|         fs.copySync(path.join("build", srcFile), destFile, { recursive: true }); |         fs.copySync(path.join("build", srcFile), destFile, { recursive: true }); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     const filesToCopy = [ |     const assetsToCopy = new Set([ | ||||||
|         "config-sample.ini", |         "./images", | ||||||
|  |         "./libraries", | ||||||
|  |         "./translations", | ||||||
|  |         "./db", | ||||||
|  |         "./config-sample.ini", | ||||||
|  |         "./src/views/", | ||||||
|         "./src/etapi/etapi.openapi.yaml", |         "./src/etapi/etapi.openapi.yaml", | ||||||
|         "./src/routes/api/openapi.json", |         "./src/routes/api/openapi.json", | ||||||
|         "./src/public/icon.png", |         "./src/public/icon.png", | ||||||
|         "./src/public/manifest.webmanifest", |         "./src/public/manifest.webmanifest", | ||||||
|         "./src/public/robots.txt" |         "./src/public/robots.txt", | ||||||
|     ]; |         "./src/public/fonts", | ||||||
|     for (const file of filesToCopy) { |         "./src/public/stylesheets", | ||||||
|         log(`Copying ${file}`); |         "./src/public/translations" | ||||||
|         await fs.copy(file, path.join(DEST_DIR, file)); |     ]); | ||||||
|     } |  | ||||||
| 
 | 
 | ||||||
|     const dirsToCopy = [ |     for (const asset of assetsToCopy) { | ||||||
|         "images", |         log(`Copying ${asset}`); | ||||||
|         "libraries", |         await fs.copy(asset, path.join(DEST_DIR, asset)); | ||||||
|         "translations", |  | ||||||
|         "db", |  | ||||||
|         "src/public/fonts", |  | ||||||
|         "src/public/stylesheets", |  | ||||||
|         "src/public/translations", |  | ||||||
|         "src/views/" |  | ||||||
|     ]; |  | ||||||
|     for (const dir of dirsToCopy) { |  | ||||||
|         log(`Copying ${dir}`); |  | ||||||
|         await fs.copy(dir, path.join(DEST_DIR, dir)); |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Panagiotis Papadopoulos
						Panagiotis Papadopoulos