AstroUXDS Figma Asset Downloader
A highly specific tool to pull website images into AstroUXDS.
It assumes the following layer setup in the Figma file:
- Parent categories are denoted by "--PARENT NAME--" layer names.
- Layers underneath and between these Parent categories are Child pages.
- Any layer or page name starting with "_" is ignored.
- Layer names must be unique. If duplicate layers are encountered, the first layer found will be exported and the tool will chirp at you.
Installation
npm i @astrouxds/astro-figma-assets --save-dev
Add a new npm script in package.json
"fetch:images": "node node_modules/@astrouxds/astrouxds-figma-assets/index.js"
Create a new .env or add the following vars:
FIGMA_ASSET_FILE_ID - the ID of the Figma file
FIGMA_ASSET_ACCESS_TOKEN - your personal Figma access token
FIGMA_ASSET_OUTPUT_DIR - where you want the images to download to