mirror of
				https://github.com/ZetaKebab/quartz.git
				synced 2025-11-03 22:49:47 +00:00 
			
		
		
		
	feat: deref symlinks when copying static assets (closes #588)
This commit is contained in:
		@@ -11,7 +11,10 @@ export const Static: QuartzEmitterPlugin = () => ({
 | 
			
		||||
  async emit({ argv, cfg }, _content, _resources, _emit): Promise<FilePath[]> {
 | 
			
		||||
    const staticPath = joinSegments(QUARTZ, "static")
 | 
			
		||||
    const fps = await glob("**", staticPath, cfg.configuration.ignorePatterns)
 | 
			
		||||
    await fs.promises.cp(staticPath, joinSegments(argv.output, "static"), { recursive: true })
 | 
			
		||||
    await fs.promises.cp(staticPath, joinSegments(argv.output, "static"), {
 | 
			
		||||
      recursive: true,
 | 
			
		||||
      dereference: true,
 | 
			
		||||
    })
 | 
			
		||||
    return fps.map((fp) => joinSegments(argv.output, "static", fp)) as FilePath[]
 | 
			
		||||
  },
 | 
			
		||||
})
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user