Skip to content
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

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

Open
scotato opened this issue Apr 5, 2021 · 2 comments
Open

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

scotato opened this issue Apr 5, 2021 · 2 comments

Comments

@scotato
Copy link

scotato commented Apr 5, 2021

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.

@scotato
Copy link
Author

scotato commented Apr 5, 2021

My non-code fix for this is to not export components directly but to setup component instance exports renamed without slashes, additionally adding them to named artboards allows the directory creation without errors.

@chrisdrackett
Copy link
Member

Sorry for the delay on this, I've been away from this project for a while. I'm getting back to it and want to clean thing up. Not ETA on this issue, just an FYI that I'm working on it!

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