
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
rollup-plugin-svgsprite-generator
Advanced tools
This rollup plugin allows you to generate an external SVG sprite file.
Run the following console command to install the plugin:
npm i rollup-plugin-svgsprite-generator
In the rollup.config.js file, import the plugin and specify the input and output folders:
import { svgSprite } from 'rollup-plugin-svgsprite-generator';
...
export default [
{
...
plugins:[
svgSprite({
input: 'folder-that-contains-the-svg-file',
output: 'path-where-to-generate-the-sprite',
})
]
}
]
You can specify the following generation options:
minify
Type: boolean
| Default value: true
Specifies whether to minify the sprite.
doctype
Type: boolean
| Default value: true
Specifies whether to include the DOCTYPE
header.
xml
Type: boolean
| Default value: true
Specifies whether to include the <xml> tag.
inlineStyles
Type: boolean
| Default value: true
Specifies whether to use inline styles instead of CSS classes in tags.
idConvert
Type: function
| Default value: id => id
Modifies the id
attribute for the <symbol>
tag. Accepts and returns a string value.
styleModification
Type: function
| Default value: id => id
Modifies inline SVG styles. Accepts and returns an object.
output
Type: string
Specifies the file path to the output SVG sprite.
input
Type: string
Specifies the folder that contains input SVG files.
hash
Type: boolean
| Default value: false
Specifies whether to add hash to the output file name.
postGenerate
Type: function
| Default value: (ids, outputFileName) => { }
A callback function executed after the sprite is generated. Accepts IDs of input files and the output file name.
FAQs
Create external svg sprite
The npm package rollup-plugin-svgsprite-generator receives a total of 562 weekly downloads. As such, rollup-plugin-svgsprite-generator popularity was classified as not popular.
We found that rollup-plugin-svgsprite-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.