1.1.4 • Published 5 years ago

webpack-css-sprite v1.1.4

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

webpack-css-sprite是一个webpack插件,用于合成雪碧图。基于gulp-css-spriter-dookay

安装

npm install webpack-css-sprite --save-dev

使用

let WebpackCssSprite = require('../webpack-css-sprite');

new WebpackCssSprite({
    cssPath: projectInfo.output + '/css/',
    spritePath: projectInfo.output + '/images/sprite/',
    spriteSheet: projectInfo.output + '/images/sprite/icon.png',
    pathToSpriteSheetFromCSS: '../images/sprite/icon.png',
    spritesmithOptions: {
        padding: 10
    },
    matchReg: {
        pattern: '\.\.\/images\/sprite\/'
    }
})

options

  • cssPath:string - 待处理css所在文件夹。
  • spritePath:string - 打包后雪碧图所在文件夹路径。

其余配置项见gulp-css-spriter-dookay

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago