Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 45531685ed
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (25 sloc) 1.195 kB
module.exports = {
plugins: {
sprite: "../"
},
tasks: {
sprite: {
options: {
"algorithm": "growingpacker",//optional 目前只有 growingpacker
"input": {
"cssRoot": "./css/", //required
"format": "png"//optional, 只支持输出PNG格式, 如果是其他格式, 也是以PNG格式输出, 仅仅把后缀改为其他后缀
},
"output": {
"cssRoot": "./sprite_output/css/",//required
"imageRoot": "../images/",//optional 相对于 cssRoot 的路径, 默认 "./image/", 最终会变成合并后的的图片路径写在css文件中
"maxSize": 60,//optional 图片容量的最大大小, 单位 KB, 默认 0
"margin": 5,//optional 合成之后, 图片间的空隙, 默认 0
"prefix": "sprite_",//optional
"format": "png",//optional 输出的图片格式
"combine": false//optional 为true时将所有图片合并为一张, 同时所有css文件合并为一个文件
}
}
}
}
}
Jump to Line
Something went wrong with that request. Please try again.