1.0.2 • Published 3 years ago
figma-assets-export v1.0.2
Installation
CLI
If using npm, run the following commnad:
npm i -g figma-assets-export
If using yarn, run the following commnad:
yarn global add figma-assets-export
Module
If using npm, run the following commnad:
npm i figma-assets-export
If using yarn, run the following commnad:
yarn add figma-assets-export
Usage
CLI
export FIGMA_TOKEN=<personalAccessToken>
export FIGMA_FILE_ID=<figmaFileId>
fae -h
NOTE: Learn how to generate a Figma personal access token here.
Module
import { exportAssets } from "figma-assets-export";
...
const fileId = <figmaFileId>; // Find this in the file URL.
const onlyFromPages = []; // Names of the pages to export from. Leave it empty for all pages.
const dest = 'assets'; // Where to download the assets.
exportAssets(fileId, onlyFromPages, dest);