1.2.5 • Published 7 years ago

gitpacker v1.2.5

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
7 years ago

gitpacker.js

Greenkeeper badge Build Status Coverage Status Dependency Standard - JavaScript Style Guide Minimum Node.js Version License

A tool to quickly pack and compress the pure git repository.

NPM

gitpacker status

Installation

CLI executable

npm install -g gitpacker

API install

npm install --save gitpacker

Usage

CLI Usage

$ gitpacker -h

  Usage: gitpacker [options] [command]


  Commands:

    zip <file> [dir]
    tar <file> [dir]

  Compress files based on git ignore.

  Options:

    -h, --help            output usage information
    -V, --version         output the version number
    -i, --include <file>  include file
    -e, --exclude <file>  exclude file
    --debug               debug mode, such as print error tracks

API Usage

const compress = require('gitpacker')

compress (method:string, directory:string, compress:string, includes:Array, excludes:Array)

Compress files to zip or tar.

  • compress method, e.g. 'zip' or 'tar',
  • working directory,
  • compress file name,
  • include files,
  • exclude files.

compress.promise (method:string, directory:string, compress:string, includes:Array, excludes:Array)

Ibid, but a Promise function.

Example

CLI Example

For example, in the current project directory, want to gitpacker and exclude all .sh and .md files:

gitpacker zip xxx.zip . -e '*.sh' -e '*.md'

or want to gitpacker the ./lib directory:

gitpacker zip xxx.zip lib

License

The Apache License 2.0

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

0.5.0

7 years ago

0.0.0

7 years ago