{"_id":"@chasemccoy/figma-action","_rev":"2-25fa3c809bbca57c04678522302d1107","name":"@chasemccoy/figma-action","dist-tags":{"latest":"1.0.0-alpha.4"},"versions":{"1.0.0-alpha.3":{"name":"@chasemccoy/figma-action","version":"1.0.0-alpha.3","description":"GitHub action for exporting Figma slices.","scripts":{"start":"node entrypoint.js"},"repository":{"type":"git","url":"https://github.com/chasemccoy/figma-action"},"bugs":{"url":"https://github.com/chasemccoy/figma-action/issues"},"keywords":["github","design-system","figma","design","image","exporter"],"author":{"name":"GitHub, Inc."},"license":"MIT","dependencies":{"fs-extra":"^7.0.0","got":"^8.3.0","p-queue":"^2.4.2","figma-js":"^1.6.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2019 GitHub, Inc. and contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","_id":"@chasemccoy/figma-action@1.0.0-alpha.3","dist":{"shasum":"d1bd754c55731c3828f6dd2831da797484c5c72a","integrity":"sha512-TDAwg7CouhA4Aqzgb5peWjWJKPfYis/yB3bnojeTPRE0VUixOzmje5FCajwiZpxMZ/RcRZKf4xYosCh12STZkQ==","tarball":"https://registry.npmjs.org/@chasemccoy/figma-action/-/figma-action-1.0.0-alpha.3.tgz","fileCount":6,"unpackedSize":8273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRaTRCRA9TVsSAnZWagAAj4gP/0gdVoL0e0BvnUVmPb4p\nmazT855C4zgv35K+5AnSzwTh6MY1cuRXl5Ls0PFkDEGlax5NWJOI8JUK09lR\nN0kRTKeY8trKE7cL3a7sO8j6CI5Jqc48VLBVD08of+XU7OsK3h1UDsNSEwQb\nku1U0g/XCAu+8Z5o24iZ7AAUOBU+kYuRQe2sYnUvkNbuki6UQpEnA5scxo/8\n08stDulaXM5pO5ZfYd9DgxYmCigXX9q+o+H6wdsHM0NnQ2v8kohr/343DeQl\nPGJION3hxF0IJEadMYsZ4JCmNw6hj0IKHkSJxBg6WtUFfAqRuDA+x0QYMEPj\npIy0/C2oER6vZKIbkxmUxTIgUqx9P0VeNKG4CM7cPkmdD1PmyWH3DruMR7ua\nBJTtQPJp4r0cnh25p3RBaud33iK4Z05vM6D3ip7i5S5N/3tAHoATgWVLzPkJ\nwbTpnV783/rFxPfZ73cAIzN6Ztw6qsgP3n0iA11jtxB1T3dmEaRgF/Gnryo8\nAd5VaHF1yirISyW2QzE8Nmmd8+kT8bWdnBMJSLSdjLz37Jx4zujaza6FCtDE\nUv6ualnWuncR+Ngzpb/Wz1NRFg1gDJ8PkaK9jIho2Zot8pULyToJ95e71yxc\n3WLmXnBOBDwseXxvxNUVujDoi4nCO4MrvVbdP8ZSizjCXXgGKeTJopw/basb\nRjhl\r\n=kNRz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMIRUAF/DgU8UIH9V7rZaTi/gmvKClqIQSZGzHPXjY9AIhALrqgp38vb6xSp+cg2OU116iLOuHrl5XUnTo03aDmjkQ"}]},"maintainers":[{"name":"chasemccoy","email":"chasem000@gmail.com"}],"_npmUser":{"name":"chasemccoy","email":"chasem000@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/figma-action_1.0.0-alpha.3_1581622480829_0.03674794160722694"},"_hasShrinkwrap":false},"1.0.0-alpha.4":{"name":"@chasemccoy/figma-action","version":"1.0.0-alpha.4","description":"GitHub action for exporting Figma slices.","scripts":{"start":"node entrypoint.js"},"repository":{"type":"git","url":"https://github.com/chasemccoy/figma-action"},"bugs":{"url":"https://github.com/chasemccoy/figma-action/issues"},"keywords":["github","design-system","figma","design","image","exporter"],"author":{"name":"GitHub, Inc."},"license":"MIT","dependencies":{"fs-extra":"^7.0.0","got":"^8.3.0","p-queue":"^2.4.2","figma-js":"^1.6.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2019 GitHub, Inc. and contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","_id":"@chasemccoy/figma-action@1.0.0-alpha.4","dist":{"shasum":"c2dbd1a473428255eeb70128324b159188047695","integrity":"sha512-tqTTpsqD++2/bnwNIpqMSVHfBunWdYMbDx/jWHh+ubbOUDeahnVhn9wlL6OVKDo3QV2REzfeJSkZMB3rweDO+A==","tarball":"https://registry.npmjs.org/@chasemccoy/figma-action/-/figma-action-1.0.0-alpha.4.tgz","fileCount":6,"unpackedSize":8273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRaVDCRA9TVsSAnZWagAAWI0P/1SK/+LAaOM1HXQlw5b/\nYNtjLMSv9KV96p/iXs/63a9N9UduBGeA/2apx+wML7PcIYVgkQZ+8kNyVqjS\nFuS5fu3rPXNjnVRWj0jO+4Wl80WwRex6kw2QRKRDZhZnByuCueMrzoF1zckk\n29zJXo9Ha53xgjSvkhNtSF2dgMERGemADW4uM34+GETD9vbxzVUO4SQIHvyP\no2um8frEfiEyMuVXmY/EY1kIY4p6KLwSerRba4yTBE/Q+M2T2hTUVbcJjgZh\nYU3/c7z/7XIRUApvhq8Bci0I52ykS+rs7dxvdZWFsjuMTzfFtbB2tHhHPN6N\nMhF5AK5fB6jxUT/tjn7bbNuaixPFQgTvoOEtiPWBC155OERAhVhOCHizNF1X\n18eVM5Jlb4RvD5qkRy101JLnqIbx6japaNXJpU8B2dyfFJd04CoNlqB7uNcL\ns82jEjl1p6gUEHD6wnznpfN/uCrSschspkTpBrrq+McfLnIYIjl9kawPcCUu\n0YhH2EYMh6JtShkJGzq6wRp+xKtZZjz66hail7sNjRdDYau/JXgPDRWNy6du\na6/kbORv3l1dJq3Q0I/LxR7G6BOkdmVOE6r9uhoyJky3nhr7ECj7dfFAYh4b\nD5ZG5R5KZr+ICNlsh/VsLpxAt58XLF45wXZZngptyrKhrqiUtJ0bO0ZFje5G\nbebV\r\n=u0/6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICw/MA+qR2zV6KavQWrIPUj1tnKKkRScetgcvMfrxJggAiALN7trS7qgjqafZjVpaZUDgd7j45ofg39dzViQKaQQuw=="}]},"maintainers":[{"name":"chasemccoy","email":"chasem000@gmail.com"}],"_npmUser":{"name":"chasemccoy","email":"chasem000@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/figma-action_1.0.0-alpha.4_1581622595565_0.5460345726019245"},"_hasShrinkwrap":false}},"time":{"created":"2020-02-13T19:34:40.795Z","1.0.0-alpha.3":"2020-02-13T19:34:40.915Z","modified":"2022-04-04T22:33:04.841Z","1.0.0-alpha.4":"2020-02-13T19:36:35.678Z"},"maintainers":[{"name":"chasemccoy","email":"chasem000@gmail.com"}],"description":"GitHub action for exporting Figma slices.","keywords":["github","design-system","figma","design","image","exporter"],"repository":{"type":"git","url":"https://github.com/chasemccoy/figma-action"},"author":{"name":"GitHub, Inc."},"bugs":{"url":"https://github.com/chasemccoy/figma-action/issues"},"license":"MIT","readme":"# GitHub action for exporting Figma components\n\n[![npm version](https://img.shields.io/npm/v/@primer/figma-action.svg)](https://www.npmjs.org/package/@primer/figma-action)\n\nA [GitHub action](https://github.com/features/actions) that will export [Figma](https://figma.com/) components from design files to your repository.\n\n## Usage\n\n**Example workflow**\n\n```workflow\nname: Export SVG from Figma\non: [push]\njobs:\n  all:\n    name: Figma Export\n    runs-on: ubuntu-latest    \n    steps:\n      - uses: primer/figma-action@v1.0.0-alpha.2\n        with:\n          args: \"format=svg outputDir=./build/\"\n        env:\n          FIGMA_FILE_URL: \"https://www.figma.com/file/ZFjrph2HUwFK8Q3uEtJIu1PT/yourfilename\"\n          FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }}\n```\n\n### Variables\n\n**Secrets**\n\n`FIGMA_TOKEN` **(required)**\n\nThis token is used to access the [Figma API](https://www.figma.com/developers/docs#access-tokens). It's required to generate one so this action will work. It's recommended to set the token in a [secret token](https://help.github.com/articles/virtual-environments-for-github-actions#creating-and-using-secrets-encrypted-variables) in your repository.\n\n**env variables**\n\n`FIGMA_FILE_URL` **(required)**\n\nThis is the file url that you would like to export from. The action will search the file for [components](https://help.figma.com/article/66-components) and export them with your configurations.\n\n**Workflow args (optional)**\n\n* `format` – The export format for exporting from Figma. Options are `svg`, `jpg`, `png`. Default is `jpg`\n* `outputDir` – Where you would like the exported files to live. Default is `./build/`\n* `scale` – When choosing an image format `jpg` or `png` this is the export scale between `0.01` and `4` that will allow you to scale the image. Default is `1`.\n\n### Output\n\nThe output of this action lives in `./build/` by default, but can be configured. In addition to the files exported you will see a `data.json` file exported. This contains information about the exported components mapped by component `id`.\n\nThe directory will look like this:\n\n```\n./outputDir/\n  ├── format/\n  |     └── componentName.format\n  └── data.json\n```\n\nThe data.json file will look like this:\n\n```js\n{\n  \"0:639\": {\n    \"name\": \"plus\", // component name\n    \"id\": \"0:639\", // component figma id\n    \"key\": \"89696b0b52493acc8692546ac829bd4e334c63a2\", // component global figma id\n    \"file\": \"FP7lqd1V00LUaT5zvdklkkZr\", // figma file key\n    \"description\": \"keywords: add, new, more\", // figma component description\n    \"width\": 12, // width of the component frame\n    \"height\": 16, // height of the component frame\n    \"image\": \"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/1/6d/1234\" // aws URL for the exported file\n  }\n}\n```\n\n## License\n\n[MIT](./LICENSE) &copy; [GitHub](https://github.com/)\n","readmeFilename":"README.md"}