gulp-tar
Version:
Create tarball from files
41 lines (26 loc) • 811 B
Markdown
> Create [tarball](https://en.wikipedia.org/wiki/Tar_(computing)) from files
```sh
npm install --save-dev gulp-tar
```
```js
import gulp from 'gulp';
import tar from 'gulp-tar';
import gzip from 'gulp-gzip';
export default () => (
gulp.src('src/*')
.pipe(tar('archive.tar'))
.pipe(gzip())
.pipe(gulp.dest('dist'))
);
```
Type: `string`
The filename for the output tar archive.
Type: `object`
Default options passed to [Archiver](https://github.com/archiverjs/node-archiver)'s [constructor](https://archiverjs.com/docs/Archiver.html) and merged into the [data](https://archiverjs.com/docs/global.html#TarEntryData) passed to its [`append`](https://archiverjs.com/docs/Archiver.html#append) method.