Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
babel-plugin-jsx-svg-icon-inject
Advanced tools
Readme
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 2 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.