Giter VIP home page Giter VIP logo

fzip's Introduction

FZip

项目介绍

一个将文件或目录压缩为 zip 格式的命令行工具

使用方法

NPM

参数说明

参数 参数来源 参数注解
-f From 压缩目标来源(必选)
-o Output 压缩产物输出位置(可选,不传则为来源同级目录)
-l Level 压缩级别 0~9(可选,不传则默认为 6)
-n Name 压缩包名称(可选,不传则默认为文件或目录的名字)
-h help 查看帮助
-V version 查看版本

使用示例

.
├── LICENSE
├── README.md
├── gulpfile.js
├── package.json
├── src
│   ├── cli.ts
│   ├── core
│   │   └── index.ts
│   ├── types
│   │   └── index.ts
│   └── utils
│       └── index.ts
├── tsconfig.json
└── yarn.lock

  • 基础用法

    • fzip -f ./src,指令执行之后会在 src 的同级目录输出一个 src.zip 的压缩包。
  • 指定输出位置

    • fzip -f ./src -o ~/Desktop,指令执行之后会在桌面上输出一个 src.zip 的压缩包。
  • 指定压缩等级

    • fzip -f ./src -o ~/Desktop -l 9,压缩产物的压缩级别为 9。
  • 重命名

    • fzip -f ./src -n test,指令执行之后会在 src 的同级目录下输出一个名为 test.zip 的压缩包。
  • 不指定参数

    • fzip ./src,指令执行之后会在 src 的同级目录下输出一个名为 src.zip 的压缩包,这是一种懒惰的做法,我不建议这么做!如果在指令后边跟了多个路径,则默认制取第一个。

上边说的都是压缩目录的,也可以压缩单个文件,使用方法类似,只需要将输入路径指向被压缩的目标文件即可。

  • 压缩单个文件
    • fzip -f ./src/cli.ts -o ~/Desktop -n test -l 9,指令执行之后会在桌面输出一个名为 test.zip 的压缩包。

fzip's People

Contributors

lxqddd avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.