0.0.4 • Published 6 months ago

zzip v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

zzip

Compression dist to zip, tar, taz. Powered by compressing

English | 简体中文

Quick Start

Compression the dist folder to dist.zip

npx zzip
# dist.zip

Compression the dist folder to dist.tgz

npx zzip --mode=tgz
# dist.tgz

Formating output name

npx zzip --name="format:dist-%cd%h"
# dist-2023-02-09-2421035.zip

Formating date

npx zzip --name="format:dist-%cd-%tag" --date=format:"%Y%m%d"
# dist-20230209-v0.0.1.zip

CLI Usage

npx zzip [...args] [<entries>]

Arguments:

  • --outdir: The output dir, . will be used as default.
  • --name: The output name. When not provided, format:%entry.name will be used as default. Use --name[=<format>] to format name. See git commit formatting, In addition to the formats provided by git, the following formats are supported:
    • %tag: latest tag name
    • %entry.name: first file/dir name
    • %package.name: package.json displayName or name field
  • --mode: Compression mode. When not provided, zip will be used as as default.
  • --overwrite: Whether to overwrite the output file, true will be used as as default. When using --no-overwrite, an error will be thrown when the file exists
  • --date=<format>: short will be used as as default. see more

Configuration

Configuration is loaded by unjs/c12 from cwd. You can use either zip.config.json, zip.config.{ts,js,mjs,cjs}, .ziprc.

See ./src/config.ts for available options and defaults.

💻 Development

  • Clone this repository
  • Enable Corepack using corepack enable (use npm i -g corepack for Node.js < 16.10)
  • Install dependencies using pnpm install
  • Run interactive tests using pnpm dev

License

Made with 💛

Published under MIT License.

0.0.3

8 months ago

0.0.2

8 months ago

0.0.4

6 months ago

0.0.1

1 year ago