
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
rollup-plugin-svg-icons
Advanced tools
Bundles all svg icons from the speciefed folder to the single spritesheet svg file
Bundles all svg icons from the specified folder to the single spritesheet svg file.
npm i -D rollup-plugin-svg-icons
/* rollup.config.js */
import svgicons from 'rollup-plugin-svg-icons'
export default {
...
plugins: [
svgicons({
// folder with svg-icons
inputFolder: 'src/icons', // it is default value
// path for the sprite file
output: 'dist/bundle.svg', // it is default value
// Also you can use any Svgstore options:
// https://github.com/svgstore/svgstore#svgstore-options
//
// cleanDefs
// cleanSymbols
// svgAttrs
// symbolAttrs
// copyAttrs
// renameDefs
// .. and inline option for `svgstore.toSting()` method
})
...
]
...
}
Use href bundle.svg#iconid
where iconid
is base part of svg-icon filename. For ex. if in source folder you have myicon.svg
then you should use bandle.svg#myicon
:
<style>
.inline-svg-icon{
display: inline-block;
fill: currentColor;
width: 24px;
height: 24px;
vertical-align: middle;
}
</style>
<svg class="inline-svg-icon">
<use xlink:href="bundle.svg#iconid"></use>
</svg>
Icons with gradients or some types of complex shapes will not be packed in the sprite correctly.
Plugin based on svgstore package.
MIT
FAQs
Bundles all svg icons from the speciefed folder to the single spritesheet svg file
The npm package rollup-plugin-svg-icons receives a total of 487 weekly downloads. As such, rollup-plugin-svg-icons popularity was classified as not popular.
We found that rollup-plugin-svg-icons 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.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.