From 654b455c3d53769dfba7cc7213ec8f9e5995f15c Mon Sep 17 00:00:00 2001 From: Daniil Subbotin Date: Thu, 20 Aug 2020 15:56:37 +0300 Subject: [PATCH] Remove old colors when exporting colors --- Sources/FigmaExport/Subcommands/ExportColors.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/FigmaExport/Subcommands/ExportColors.swift b/Sources/FigmaExport/Subcommands/ExportColors.swift index 90aafd3..6ab6f79 100644 --- a/Sources/FigmaExport/Subcommands/ExportColors.swift +++ b/Sources/FigmaExport/Subcommands/ExportColors.swift @@ -82,6 +82,11 @@ extension FigmaExportCommand { let exporter = XcodeColorExporter(output: output) let files = exporter.export(colorPairs: colorPairs) + + if iosParams.colors.useColorAssets, let url = colorsURL { + try? FileManager.default.removeItem(atPath: url.path) + } + try fileWritter.write(files: files) }