npm.io
1.0.2 • Published 3 years ago

builder-utils-intl

Licence
BSD-3-Clause
Version
1.0.2
Deps
2
Size
16 kB
Vulns
0
Weekly
0

builder-utils-intl

version license downloads

构建工具常用的方法

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

Keywords