Cli API

Cli API

  • figma-extract - extract all from Figma. Each file type is downloaded to a local dir specified in config. Note: If there are files in the icons dir already they won't be removed (files with the same name will be overwritten though). Hence, the contents of the dir need to be removed manually in case there are outdated icons that are not present in Figma.
  • figma-extract --only=colors, icons - extract only colors and icons. The available options colors, icons, textStyles, effects, gradients.
  • figma-extract --local-icons - bypass downloading icons from Figma, generate sprite from local svg files instead. Simply add files to the directory where icons from Figma are usually downloaded, the sprite would be generated from them. Note: if there are multi configs for icons' field then all such configs will have localIcons = true after launching this key.
    ATTENTION: --local-icons does only work with icons. It means that figma icons won't be downloaded and only local icons will be touched. Other functionality won't be disabled (such as colors, text-styles and etc.). If you want to launch only work with icons, you need to run such command: figma-extract --only=icons --local-icons
  • figma-extract --verbose - show more information in console.