Skip to content

Import multiple asset folder of images #252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
KulakovaE opened this issue Feb 11, 2025 · 4 comments
Open

Import multiple asset folder of images #252

KulakovaE opened this issue Feb 11, 2025 · 4 comments

Comments

@KulakovaE
Copy link

KulakovaE commented Feb 11, 2025

Hi,
This is more of a question about support rather than an issue.

Currently, we import icons and images, and we received a request to import another group of images called "shapes." We’re setting it up as follows:

icons:
    format: pdf
    assetsFolder: Icons
    nameStyle: camelCase
    preservesVectorRepresentation:
    - regularUser
    imageSwift: "-path-"

  images:
    illustrations:
      assetsFolder: Illustrations
      nameStyle: camelCase
      figmaFrameName: Illustrations
      imageSwift: "-path-"

    shapes:
      assetsFolder: Shapes
      format: pdf
      nameStyle: camelCase
      figmaFrameName: Shapes
      nameValidateRegexp: '^shape[/a-z0-9_]*$'
      imageSwift: "-path-"

We initially tried structuring "illustrations" and "shapes" as a list, but this caused parsing issues when exporting icons, which seemed unexpected.
The error we get:

typeMismatch(Yams.Node.Mapping, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "ios", intValue: nil), CodingKeys(stringValue: "images", intValue: nil)], debugDescription: "Expected to decode Mapping but found Node instead.", underlyingError: nil))

Do you know how we can resolve this? Any insights would be greatly appreciated!

Thanks,
Elena

@KulakovaE KulakovaE changed the title Import multiple frames of images Import multiple asset folder of images Feb 11, 2025
@subdan
Copy link
Collaborator

subdan commented Feb 14, 2025

Hi!

we received a request to import another group of images called "shapes."

What is “shapes”?

We’re setting it up as follows:

shapes:
assetsFolder: Shapes
format: pdf

Config file doesn’t support “shapes” parameter.

@subdan
Copy link
Collaborator

subdan commented Feb 14, 2025

Use two separate figma-export.yaml files for different image groups. You cannot specify two Figma frames for exporting images in one config file.

@KulakovaE
Copy link
Author

Use two separate figma-export.yaml files for different image groups. You cannot specify two Figma frames for exporting images in one config file.

Thank you for the answer @subdan.
The shapes are another type of images that is as part of a separate frame.
Would it work with a same figma fileId or only having two separate figma-export.yaml files should be enought?

@subdan
Copy link
Collaborator

subdan commented Feb 17, 2025

Would it work with a same figma fileId or only having two separate figma-export.yaml files should be enought?

Only two separate figma-export.yaml files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants