Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
A flexible wrapper arround svgo for furher SVG processing or to add addtional files. Svgpipe comes with predefined handlers, but it is easy to create your own. For example, build an icon component based on your SVG files.
npm i --save-dev svgpipe
pnpm i -D svgpipe
yarn add -D svgpipe
npx svgpipe init
npx svgpipe run
npx svgpipe --help
// svgpipe.config.ts
import { defineConfig } from "svgpipe";
export default defineConfig({
baseOutputDir: "svgpipe", // that's the default
// You can process multiple folders (moduls) with svgs each with its own config
modules: {
// Create a module with a predefined handler
inputFolderName: "vue-inline",
// Or pass options to the predefined handler
anotherInput: {
handler: "vue-inline"
svgo: {
// custom config
config: {},
// opt out of the default merging behaviour
replace: true,
// print the config o the terminal
stdout: true
}
},
// Create your own handler
oneMoreInput: {
handler: (conf) => ({
onFile(svgFile){
// do your thing with with every svgo processed file
// return it if you want to keep it
return svgFile
}
onEnd(ctx) {
// cleanup or create custom files like a css file
// return [customFile]
}
})
}
},
});
vue-inline
Creates a vue component that imports all SVGs. This components depends on vite-svg-loader
.
Imlement a CreateHandler
. This is a function that recieves ervery processed module config and returns a ISvgHandler
. This has three properties. onFile
: Will be called for every processed input svg file. Retrun the file if you want to keep it. onEnd
: Will be called with the Context
after all svgs are processed. The Context
provides a type handler that creates a TypeScript type for the module and a corresponding token handler.
import type { CreateHandler } from "svgpipe"
const myHanlder: CreateHandler = (conf) => ({})
FAQs
A flexible CLI tool around svgo for further postprocessing.
The npm package svgpipe receives a total of 277 weekly downloads. As such, svgpipe popularity was classified as not popular.
We found that svgpipe demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.