在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):Wenqer/gulp-base64开源软件地址(OpenSource Url):https://github.com/Wenqer/gulp-base64开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-base64Gulp task for converting all files found within a stylesheet (those within a url( ... ) declaration) into base64-encoded data URI strings. InstallInstall with npm
Example usagevar gulp = require('gulp');
var base64 = require('./build/gulp-base64');
//basic example
gulp.task('build', function () {
return gulp.src('./css/*.css')
.pipe(base64())
.pipe(concat('main.css'))
.pipe(gulp.dest('./public/css'));
});
...
//example with options
gulp.task('build', function () {
return gulp.src('./css/*.css')
.pipe(base64({
baseDir: 'public',
extensions: ['svg', 'png', /\.jpg#datauri$/i],
exclude: [/\.server\.(com|net)\/dynamic\//, '--live.jpg'],
maxImageSize: 8*1024, // bytes,
deleteAfterEncoding: false,
debug: true
}))
.pipe(concat('main.css'))
.pipe(gulp.dest('./public/css'));
}); Options
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论