figma-export
figma-export copied to clipboard
Provide parameter to not delete the directory when exporting
Sometime we got too many icons in one Figma Frame, so designer might split them into several Frames. That way, designer got flexibility to manage icons in different frames, developer also benefit from no need to wait too long on fetch the icons when using figma-export.
Currently, when run the export icons command, the script will clean up the whole directory first, then started to fetch icons.
Thinking if user can provide a parameter that allow not to delete
the directory, so the behavior will be append and replace
.
I think here is the part where the directly got deleted (ExportIcons.swift):
if filter == nil {
try? FileManager.default.removeItem(atPath: assetsURL.path)
}
All the script commands should behave the same way like before, but we provide not to clean up
logic.
any chance we can make this behavior happen?

Hello, @lichin-lin. To not to delete the directory just add *
argument at the end of the command.
E.g. figma-export icons -i ./figma-export.yaml "*"
@lichin-lin did the command above work for you?