Skip to content

Exports with "/" in the name break figmint #31

@scotato

Description

@scotato

In Figma it's common to namespace components with / to make it easier to manage components in your documents. This works fine on figmint colors but it breaks on asset exports.

For example If I have a set of beard components beard/white, beard/black, beard/brown, figmint treats those slashes as directories and somewhere in the code it's not expecting the exports to go into nested directories so it breaks:

Error: ENOENT: no such file or directory, open 'assets/exports/characters/beard/white.png'
Emitted 'error' event on WriteStream instance at:
    at internal/fs/streams.js:375:14
    at FSReqCallback.oncomplete (fs.js:171:23) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'assets/exports/characters/beard/white.png'
}

Naming the components with a hyphen instead of a slash works (beard-white), but prevents you from using the built in Figma organization which is based on slashes.

Love the project, I'll see if I can contribute a fix but I'm not familiar with this code base so somebody else might be able to resolve this faster.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions