Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leye195/figma-assets-exporter
package for exporting assets from Figma API
https://github.com/leye195/figma-assets-exporter
Last synced: 20 days ago
JSON representation
package for exporting assets from Figma API
- Host: GitHub
- URL: https://github.com/leye195/figma-assets-exporter
- Owner: leye195
- Created: 2024-06-26T12:25:56.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-10-31T14:44:25.000Z (2 months ago)
- Last Synced: 2024-11-15T18:37:35.175Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Figma Assets Exporter
package for exporting assets from Figma API
## How to get figma access token?
- https://www.figma.com/developers/api?fuid=1432579692283177650#access-tokens
## Examples
```
import { FigmaAssetExporter } from "./figma";(async () => {
const figmaExporter = new FigmaAssetExporter({
token: "figma access token",
pageName: "All icons",
assetsPath: "assets/", // folder path that you want to store assets
fileId: "mgKaQN0rrDKx9FrfbtNJE0", // figma fileId
});const assets = await figmaExporter.getAssets(["489-220448"]); // node-id
const results = await figmaExporter.exportAssets(assets);
await figmaExporter.saveAssets(results);
})();```