在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):kimjoar/gulp-css-rebase-urls开源软件地址(OpenSource Url):https://github.com/kimjoar/gulp-css-rebase-urls开源编程语言(OpenSource Language):JavaScript 67.9%开源软件介绍(OpenSource Introduction):THIS REPO IS OUT OF DATE. IF YOU WANT TO MAINTAIN IT, PLEASE CONTACT ME VIA EMAIL.gulp-css-rebase-urls
This is still a work in progress InstallInstall with npm
Examplevar gulp = require('gulp');
var rebaseUrls = require('gulp-css-rebase-urls');
gulp.task('default', function () {
gulp.src('css/**/*.css')
.pipe(rebaseUrls())
.pipe(concat('style.css')) // <-- just an example
.pipe(gulp.dest('./build/'));
}); What it tries to solveLet's say you have this structure:
In .sel {
background: url('../img/deeper/c.jpg') no-repeat top left;
} And in .item {
background: url('../../../../img/a.jpg') no-repeat top left;
} When I minify everything, for example to be in .sel {
background: url('img/deeper/c.jpg') no-repeat top left;
}
.item {
background: url('img/a.jpg') no-repeat top left;
} Pull requests and use cases welcome. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论