Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@minolettinat/proxy-figma-export-output-components-as-svg

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@minolettinat/proxy-figma-export-output-components-as-svg

Outputter for @minolettinat/proxy-figma-export that exports components as svg

  • 4.5.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@figma-export/output-components-as-svg

Outputter for @figma-export that exports components as svg.

With this outputter you can export all components as svg into the specified output folder.

This is a sample of the output from this Figma file:

$ tree output/
# output
# ├── icons
# │   ├── figma-arrow.svg
# │   ├── figma-export.svg
# │   └── figma-logo.svg
# └── unit-test
#     ├── figma
#     │   ├── logo
#     │   │   ├── main (bright).svg
#     │   │   └── main.svg
#     │   └── logo.svg
#     └── figma default logo.svg

Tip: A component named icon/eye will be exported as eye.svg inside the icon folder.

.figmaexportrc.js

You can easily add this outputter to your .figmaexportrc.js:

module.exports = {
    commands: [
        ['components', {
            fileId: 'fzYhvQpqwhZDUImRz431Qo',
            onlyFromPages: ['icons', 'unit-test'],
            outputters: [
                require('@figma-export/output-components-as-svg')({
                    output: './output'
                })
            ]
        }],
    ]
}

output is mandatory.

getDirname and getBasename are optional.

const path = require('path');

...

require('@figma-export/output-components-as-svg')({
    output: './output',
    getDirname: (options) => `${options.pageName}${path.sep}${options.dirname}`,
    getBasename: (options) => `${options.basename}.svg`,
})

defaults may change, please refer to ./src/index.ts

Install

Using npm:

npm install --save-dev @figma-export/output-components-as-svg

or using yarn:

yarn add @figma-export/output-components-as-svg --dev

Keywords

FAQs

Package last updated on 19 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc