Package Exports
- @figma-export/cli
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@figma-export/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@figma-export/cli
Command line for @figma-export.
Install
Using npm:
npm i -D @figma-export/clior using yarn:
yarn add @figma-export/cli --devUsage
export FIGMA_TOKEN=<personalAccessToken>
figma-export [COMMAND]Commands
components
figma-export components [FILEID]transformers
A transform function receives an SVG and turns it into something new.
You can create you own:
module.exports = options => {
return (svg) => new Promise((resolve, reject) => {
resolve(svg);
});
}module.exports = options => {
return async (svg) => {
return svg;
};
}npm install -g @figma-export/transform-svg-with-svgo
figma-export components RSzpKJcnb6uBRQ3rOfLIyUs5 -T @figma-export/transform-svg-with-svgooutputters
An output function receives a list of pages, in which each page contains components.
You can create you own:
module.exports = options => {
return async pages => {
console.clear();
console.log(JSON.stringify(pages));
};
}Usage:
npm install -g @figma-export/output-components-as-svg
figma-export components RSzpKJcnb6uBRQ3rOfLIyUs5 -O @figma-export/output-components-as-svg