1.0.2 • Published 1 year ago
builder-utils-intl v1.0.2
builder-utils-intl
构建工具常用的方法
Getting Started
$ npm install builder-utils-intl --save
import { compress2tar } from 'builder-utils-intl';
// 压缩文件
compress2tar('./build', './build/seed.jsbundle');
API
compress2tar
declare function compress2tar(sourcePath: string, targetFile: string, destPath?: string | false, tarOptions?: ZlibOptions): Promise<CompressResult>;
// ZlibOptions 定义见 https://nodejs.org/docs/latest/api/zlib.html
interface CompressResult {
size: string; // 格式化后的文件大小
byte: number; // 生成文件的字节数
filePath: string; // === targetFile
}
compress2zip
同 compress2tar
CHANGELOG
- 1.0.0: 完成 compress 模块
LICENSE
BSD-3-Clause License