Skip to content

Commit

Permalink
refactor(icon-import): change alias separator to comma
Browse files Browse the repository at this point in the history
  • Loading branch information
larsrickert committed Sep 18, 2024
1 parent 516c9f5 commit 6af99cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/figma-utils/src/commands/import-icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const importIconsCommand = new Command("import-icons")
.option(
"-s, --alias-separator <string>",
"Separator for icon alias names (which can be set to the component description in Figma).",
"|",
",",
)
.action(importIconsCommandAction);

Expand Down
4 changes: 2 additions & 2 deletions packages/figma-utils/src/icons/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type ParseIconComponentsOptions = {
/**
* Separator for icon alias names (which can be set to the component description in Figma).
*
* @default "|"
* @default ","
*/
aliasSeparator?: string;
};
Expand All @@ -28,7 +28,7 @@ export const parseComponentsToIcons = (options: ParseIconComponentsOptions): Par
id: component.node_id,
name: component.name,
aliases: component.description
.split(options.aliasSeparator ?? "|")
.split(options.aliasSeparator ?? ",")
.map((alias) => alias.trim())
.filter((i) => i !== ""),
category: component.containing_frame.name.trim(),
Expand Down

0 comments on commit 6af99cf

Please sign in to comment.