gulp-custom-css-urls
a plugin for gulp to custom you image url inline css file, and support output image file, then you can upload image file to Cloud CDN.
usage
var customCssUrls = ;var gulp = ;var path = ;gulp;gulp; //rollback template contentgulp;gulp;gulp;gulp;
//css file content, input:
div{background-image: url('/images/example.png');}
// output filename formats: (filename + '' + imgWidth + '' + imgHeight + '.' + crc32 + ext)
div{background-image: url('/images/example_width_height.hash.png');}
test
- npm test
- npm run cov
change log
-
0.3.0
feature support: image src support leftspace and rightspace.
-
0.2.2
bug fix: when template contain script, and have code xxx.src=xxx, will cause bug.
-
0.2.0
add option forceModify: which is a function , change url and direct return result.
-
0.1.0
add option ext: which support css, html ,jade, default css. add option skip: which is a array, url will skip when contain character in skip array.
-
0.0.1
only support css file.