在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):Otouto/gulp-raster开源软件地址(OpenSource Url):https://github.com/Otouto/gulp-raster开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-raster
UsageFirst, install npm i -S gulp-raster Then, add it to your var raster = require('gulp-raster');
var rename = require('gulp-rename');
gulp.src('./src/**/svg/*.svg')
.pipe(raster())
.pipe(rename({extname: '.png'}))
.pipe(gulp.dest('./dist')), You also can specify scale and file format. Let`s say you want get icon set for retina: var raster = require('gulp-raster');
var rename = require('gulp-rename');
gulp.src('./src/**/svg/*.svg')
.pipe(raster({format: 'jpg', scale: 2}))
.pipe(rename({extname: '.jpg', suffix: '-2x'})
.pipe(gulp.dest('./dist')), APIraster(options)options.scaleType: Set scale rate of output image. options.formatType: Set output file format, png/jpg are available. License |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论