figma / code-connect

A tool for connecting your design system components in code with your design system in Figma
MIT License
878 stars 64 forks source link

HTML Code Connect environment file should be branded to figma and read from the project root #173

Open dcitron opened 2 weeks ago

dcitron commented 2 weeks ago

At present, as per https://github.com/figma/code-connect/blob/main/docs/html.md#basic-setup the developer needs to have an .env file in the same directory that the figma connect command is being run if they choose to use file-based access tokens.

It would be more usable (and more in line with how other tools work), if this was migrated to a .figmarc or .figma.conf or .figma.env file (or similar) at the project root. The file could be expanded into ini or JSON format to allow for future configuration of other settings.

The connect command could then walk up to the project root looking for that file (or just read it from the project root) similar to how other command-line tools that integrate with projects work.

sekeidesign commented 2 weeks ago

yes please, this is really frustrating and forces me to have a second .env file, and also prevents me from being able to create the Figma Connect files in the directory of the component itself.

Right now I have to create it outside where the .env is, and then move the file to the right directory