Write AVIF image generation script
This commit is contained in:
@ -38,8 +38,20 @@ final class ImageGenerator {
|
||||
|
||||
private var avifCommands: Set<String> = []
|
||||
|
||||
func printAvifCommands() {
|
||||
avifCommands.sorted().forEach { print($0) }
|
||||
/**
|
||||
Write a file to the output folder containing a script to generate all missing AVIF images.
|
||||
|
||||
- Note: AVIF images could be generated internally, but the process is very slow.
|
||||
*/
|
||||
func writeAvifCommandScript() {
|
||||
guard !avifCommands.isEmpty else {
|
||||
if storage.hasFileInOutputFolder("generate-images.sh") {
|
||||
storage.deleteInOutputFolder("generate-images.sh")
|
||||
}
|
||||
return
|
||||
}
|
||||
let content = avifCommands.sorted().joined(separator: "\n")
|
||||
storage.write(content, to: "generate-images.sh")
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user