Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@figma-export/output-components-as-svg
Advanced tools
Outputter for @figma-export that exports 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 aseye.svg
inside theicon
folder.
You can easily add this outputter to your .figmaexportrc.js
:
import asSvg from '@figma-export/output-components-as-svg'
export default {
commands: [
['components', {
fileId: 'fzYhvQpqwhZDUImRz431Qo',
onlyFromPages: ['icons', 'unit-test'],
outputters: [
asSvg({
output: './output'
})
]
}],
]
}
output
is mandatory.
getDirname
and getBasename
are optional.
import asSvg from '@figma-export/output-components-as-svg'
import path from 'path'
...
asSvg({
output: './output',
getDirname: (options) => `${options.pageName}${path.sep}${options.dirname}`,
getBasename: (options) => `${options.basename}.svg`,
})
defaults may change, please refer to
./src/index.ts
Using npm:
npm install --save-dev @figma-export/output-components-as-svg
or using yarn:
yarn add @figma-export/output-components-as-svg --dev
FAQs
Outputter for @figma-export that exports components as svg
The npm package @figma-export/output-components-as-svg receives a total of 4,245 weekly downloads. As such, @figma-export/output-components-as-svg popularity was classified as popular.
We found that @figma-export/output-components-as-svg demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.