blob: 47c21313290d2bef1973500171d30fc3563dbac5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# gulp-tar [![Build Status](https://travis-ci.org/sindresorhus/gulp-tar.svg?branch=master)](https://travis-ci.org/sindresorhus/gulp-tar)
> Create [tarball](http://en.wikipedia.org/wiki/Tar_(computing)) from files
## Install
```
$ npm install --save-dev gulp-tar
```
## Usage
```js
const gulp = require('gulp');
const tar = require('gulp-tar');
const gzip = require('gulp-gzip');
gulp.task('default', () =>
gulp.src('src/*')
.pipe(tar('archive.tar'))
.pipe(gzip())
.pipe(gulp.dest('dist'))
);
```
## API
### tar(filename, [options])
#### filename
Type: `string`
Filename for the output tar archive.
#### options
Type: `object`
Default file headers passed to [tar-stream](https://github.com/mafintosh/tar-stream).
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)
|