@design-automata/node-figma
v0.2.3
Published
Zero-dependency wrapper around the Figma API for Node.js
Downloads
8
Readme
node-figma
Zero-dependency wrapper around the Figma API for Node.js.
Getting started
Grab the lib:
npm i @design-automata/node-figma
Export your Figma PAT in your environment variables before proceeding.
export FIGMA_PAT="your_figma_pat"
Import and use:
const { getFile } = require('@design-automata/node-figma')
// ES6
import { getFile } from '@design-automata/node-figma'
Supported API
getFile(fileId: string, optionalParams?: getFileOptionalParams)
getFileNodes(fileId: string, nodeIds: string, optionalParams?: getFileNodesOptionalParams)
getFileImages(fileId: string, nodeIds: string, optionalParams?: getFileImagessOptionalParams)
getFileStyles(fileId: string)
getTeamStyles(teamId: string, optionalParams?: getTeamStylesOptionalParams)