nectar
Create tar archive of files matching glob(s)
Last updated 5 years ago by jmversteeg .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install nectar 
SYNC missed versions from official npm registry.

nectar

Create .tar archive of files matching glob(s)

Makes a great team with extrakt.

Build Status Code Quality Code Coverage NPM Version

Install

$ npm install --save nectar

Usage

const nectar = require('nectar');

await nectar(['resources/**/*.js'], 'bundle.tar');
// packs all .js files inside 'resources' into 'bundle.tar'

Create .tar.gz (using streaming mode)

const fs     = require('fs');
const zlib   = require('zlib');

const gZip   = zlib.createGzip();

nectar(['resources/**/*.js'])
    .pipe(gZip)
    .pipe(fs.createWriteStream('bundle.tar.gz'));

API

nectar(input, [output], [options])

Creates a .tar archive containing all files matched by the given input glob(s). The directory structure, relative to the working directory, is preserved.

If the output argument is provided, the archive is written to output and a promise is returned for an array of the paths of the matches entries. If no output argument is provided, a promise for a readable stream for the archive will be returned.

input

Type: string|string[]

Input glob(s).

output

Type: string|WritableStream

Optional output path or a writable stream.

options.cwd

Type: string Default: process.cwd()

Optional working directory for glob matching

License

MIT © sgtlambda

dependency Status devDependency Status

Current Tags

  • 5.0.6                                ...           latest (a year ago)
  • 6.0.0-0                                ...           next (10 months ago)

35 Versions

  • 6.0.0-0                                ...           10 months ago
  • 5.0.6                                ...           a year ago
  • 5.0.5                                ...           2 years ago
  • 5.0.4                                ...           3 years ago
  • 5.0.3                                ...           3 years ago
  • 5.0.2                                ...           3 years ago
  • 5.0.1                                ...           3 years ago
  • 5.0.0                                ...           4 years ago
  • 4.0.0                                ...           4 years ago
  • 3.0.1                                ...           4 years ago
  • 3.0.0                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.0.4                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
  • 0.8.3                                ...           4 years ago
  • 0.8.2                                ...           4 years ago
  • 0.8.1                                ...           5 years ago
  • 0.8.0                                ...           5 years ago
  • 0.7.0                                ...           5 years ago
  • 0.6.0                                ...           5 years ago
  • 0.5.2                                ...           5 years ago
  • 0.5.1                                ...           5 years ago
  • 0.5.0                                ...           5 years ago
  • 0.4.0                                ...           5 years ago
  • 0.3.4                                ...           5 years ago
  • 0.3.3                                ...           5 years ago
  • 0.3.2                                ...           5 years ago
  • 0.3.1                                ...           5 years ago
  • 0.3.0                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (10)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |