
Security News
OpenGrep Restores Fingerprinting in JSON and SARIF Outputs
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
babel-plugin-jsx-svg-icon-inject
Advanced tools
This plugin that translates this:
<Icon name="eye" />
into this:
var _iconMarkupEye = require("some-path/eye.svg");
<Icon markup={_iconMarkupEye} />;
It does not contain any implementation of the Icon
component or a loader for the svg icons.
Install from the npm and then add this to .babelrc
:
{
"plugins": [
["jsx-svg-icon-inject", {
"path": "some-path",
"tagName": "Icon"
}]
]
}
path
(required)If the path is absolute, it will stay as is in require
.
If the path is relative (e.g. ./some-path
), it will be resolved using the current working directory, and the path in require
will be relative wrt the transpiled script.
Else the path is treated as a "package name" and is left as is.
tagName
(required)Only the tags that have this name will be processed.
namePropName
Default: 'name'
The value of the prop with this name will be used for getting the icon path.
markupPropName
Default: 'markup'
The value of the prop with this name will be used for setting the icon markup.
Copyright (c) 2017 Rafał Ruciński. Licensed under the MIT license.
FAQs
This plugin that translates this: ```jsx ```
The npm package babel-plugin-jsx-svg-icon-inject receives a total of 3 weekly downloads. As such, babel-plugin-jsx-svg-icon-inject popularity was classified as not popular.
We found that babel-plugin-jsx-svg-icon-inject 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.
Security News
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.