node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org ยป



An Example:

const SpritePlugin = require('sprite-plugin-webpack');

new SpritePlugin({
	src: './src/asset/sprite',// dir of sprite slices
	dest: {
		image: './src/images/sprite_[group][dpr].png',// paths of generated image files. required.
		css: './src/css/_sprite_[group].scss'// paths of generated css files. required.
	watch: {
		pattern: 'src/asset/sprite/**/*.{jpg,png}',// watch these files to reload. required.
		cwd: undefined// current working dir for watching. optional.
	useRetina: false,// optional. default: false
	useRem: false,// optional. default: false
	cssTemplate: function(sprite, options) {}// the function to generate css contents. optional.