0.0.4 • Published 2 years ago
zzip v0.0.4
zzip
Compression dist to zip, tar, taz. Powered by compressing
English | 简体中文
Quick Start
Compression the dist folder to dist.zip
npx zzip
# dist.zipCompression the dist folder to dist.tgz
npx zzip --mode=tgz
# dist.tgzFormating output name
npx zzip --name="format:dist-%cd%h"
# dist-2023-02-09-2421035.zipFormating date
npx zzip --name="format:dist-%cd-%tag" --date=format:"%Y%m%d"
# dist-20230209-v0.0.1.zipCLI 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(usenpm i -g corepackfor Node.js < 16.10) - Install dependencies using
pnpm install - Run interactive tests using
pnpm dev
License
Made with 💛
Published under MIT License.