# builder-utils-intl

> 工程构建相关的方法

Latest version **1.0.2** (published 2023-02-18) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install builder-utils-intl
pnpm add builder-utils-intl
yarn add builder-utils-intl
bun add builder-utils-intl
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-02-18 |
| First published | 2023-01-09 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 15.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | CAIHUAZHI |
| Maintainers | huarse |
| Keywords | builder-utils |

## Links

- npm: https://www.npmjs.com/package/builder-utils-intl
- npm.io page: https://npm.io/package/builder-utils-intl

## Dependencies (2)

- [archiver](https://npm.io/package/archiver.md) ^5.3.1
- [@irim/cli-base](https://npm.io/package/@irim/cli-base.md) ^1.2.0

## Recent versions

- 1.0.2 (latest) — 2023-02-18
- 1.0.1 — 2023-01-10
- 1.0.0 — 2023-01-09

## README

# builder-utils-intl

![version](https://img.shields.io/npm/v/builder-utils-intl)
![license](https://img.shields.io/npm/l/builder-utils-intl)
![downloads](https://img.shields.io/npm/dw/builder-utils-intl)

<!-- 一句话描述 -->
构建工具常用的方法

## Getting Started

- `$ npm install builder-utils-intl --save`

```ts
import { compress2tar } from 'builder-utils-intl';

// 压缩文件
compress2tar('./build', './build/seed.jsbundle');
```

## API

### `compress2tar`

```ts
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

<!-- - **version**: change logs -->
- **1.0.0**: 完成 compress  模块

## LICENSE

BSD-3-Clause License

---
_Source: https://npm.io/package/builder-utils-intl · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
