code-connect icon indicating copy to clipboard operation
code-connect copied to clipboard

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

Open dcitron opened this issue 1 year ago • 1 comments

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.

dcitron avatar Sep 24 '24 15:09 dcitron

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

sekeidesign avatar Sep 26 '24 19:09 sekeidesign