Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
framer-svg-component-generator
Advanced tools
A simple utility which takes a (nested) folder of SVGs and generates TypeScript React components with Framer Property Controls. It will also generate a `schema.json` file which contains parsed metadata about each SVG.
A simple utility which takes a (nested) folder of SVGs and generates TypeScript React components with Framer Property Controls. It will also generate a schema.json
file which contains parsed metadata about each SVG.
yarn global add framer-svg-component-generator
framer-svg-component-generator ./icons ./components
This utility will search recursively for .svg files within the given input directory.
A component will be generated for each SVG this utility finds. Each component will have a property control of ControlType.Color
which controls the fill of the SVG.
Alongside the individual components for each SVG, you'll also get a generic <Icon/>
component with a property control that shows a dropdown of the available icons. The option titles match the nested structure of the original input directory to avoid duplicate icon names.
The filename of the generated components will match the name of the original SVG.
The generated components will adhere to the same structure as the input directory.
By default this utility will write a schema.json
file to the root of the output directory. This schema provides a definition of each imported SVG with metadata parsed from the body of the SVG itself. The structure will look similar to the following:
[
{
"id": "Circle",
"metadata": {
"name": "Circle",
"asset": "Icon",
"description": "A circle icon for testing",
"keywords": ["Circle", "round"],
"size": "16"
}
}
]
The keywords
metadata is interpreted as a comma-separated list of keywords and parsed to a JSON array.
FAQs
A simple utility which takes a (nested) folder of SVGs and generates TypeScript React components with Framer Property Controls. It will also generate a `schema.json` file which contains parsed metadata about each SVG.
The npm package framer-svg-component-generator receives a total of 0 weekly downloads. As such, framer-svg-component-generator popularity was classified as not popular.
We found that framer-svg-component-generator demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.