Skip to content

aprilandjan/gulp-format2x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-format2x

把一些工具(例如cutterman)生成的2x图转换成偶数宽高的, 避免在2x->1x时的像素偏差以及类似gulp-spritesmith之类的工具在读取这些图片时提示尺寸不匹配

Build Status

install

npm install --save-dev gulp-format2x

Usage

var gulp = require('gulp')
var format2x = require('./index')

gulp.task('default', () => {
    return gulp.src('./test/input/**@2x.*')
        .pipe(format2x({verbose: true}))
        .pipe(gulp.dest('./test/output'))
})

Config

verbose: whether to show files process log, 是否打印文件遍历信息

What's more

Currently only png files are supported, 当前只支持 png 图片

About

A gulp plugin to format 2x images with even size

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published