Package Exports
- nectar
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nectar) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
nectar
Create tar archive of files matching glob(s)
Install
$ npm install --save nectarUsage
const nectar = require('nectar');
nectar(['resources/**/*.js'], 'bundle.tar');
// packs all .js files inside 'resources' into 'bundle.tar' and returns a promise for an array of the paths of the packed entries
nectar(['resources/**/*.js']);
// returns a readable stream for an archive containing all .js files inside 'resources'
const fs = require('fs');
const zlib = require('zlib');
let gZip = zlib.createGzip();
nectar(['resources/**/*.js'], gZip.pipe(fs.createWriteStream('bundle.tar.gz')));
// compresses all .js files inside 'resources' into 'bundle.tar.gz' and returns a promise for an array of the paths of the packed entriesAPI
nectar(input, [output])
Creates a tar archive containing all files matched by the given input glob(s). The directory structure 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.
License
MIT © JM Versteeg