
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
spritesmith-webpack-plugin
Advanced tools
It is a webpack-plugin for sprite
npm i spritesmith-webpack-plugin -D
{
plugins: [
new SpritesmithWebpackPlugin({
prefix: 'icon',
rootPrefix: 'index',
resultImageType: 'png',
resultCssType: 'css',
padding: 6,
retinaIdentifier: '@2x',
retinaDPR: 2,
minResolution: 192,
unit: 'px',
hash: false,
watch: false,
paths: {
source: resolve('src/assets/sprite'),
result: resolve('src/style/sprite'),
resultCss: resolve('src/style/sprite/css'),
resultImage: resolve('src/style/sprite/images')
},
success() {
// TODO
}
})
]
}
default: icon css className prefix, fore example:
.icon-home-down{ width: 20px; height: 31px; background-position: 0px -70px; }
default: index css className rootPrefix
default: png the type of result images
default: css the padding value of result images
default: @2x the identifier of image filter for retina
default: retinaDPR = 2, minResolution = 192
@media(-webkit-min-device-pixel-ratio:2),(min-resolution: 192dpi){
.icon-home-down,.icon-home-good,.icon-home-triangle-right,.icon-home-update {
display:inline-block;
background-repeat:no-repeat;
background-image:url("../images/home@2x.png?t=1575970989349");
background-size: 116px 101px;
}
}
default: px
default: false whether hash value is required
default: false this can watch images by directory.
{
source: resolve('src/assets/sprite'),
result: resolve('src/style/sprite'),
resultCss: resolve('src/style/sprite/css'),
resultImage: resolve('src/style/sprite/images')
}
default: null
FAQs
It is a webpack-plugin for sprite
We found that spritesmith-webpack-plugin 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.