https://github.com/sindresorhus/gulp-tar
Create tarball from files
https://github.com/sindresorhus/gulp-tar
compress gulp-plugin javascript nodejs tar tarball
Last synced: about 1 year ago
JSON representation
Create tarball from files
- Host: GitHub
- URL: https://github.com/sindresorhus/gulp-tar
- Owner: sindresorhus
- License: mit
- Created: 2013-12-22T19:40:54.000Z (over 12 years ago)
- Default Branch: main
- Last Pushed: 2023-11-03T08:38:17.000Z (over 2 years ago)
- Last Synced: 2025-03-29T05:22:30.288Z (about 1 year ago)
- Topics: compress, gulp-plugin, javascript, nodejs, tar, tarball
- Language: JavaScript
- Size: 46.9 KB
- Stars: 29
- Watchers: 6
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# gulp-tar
> Create [tarball](https://en.wikipedia.org/wiki/Tar_(computing)) from files
## Install
```sh
npm install --save-dev gulp-tar
```
## Usage
```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'))
);
```
## API
### tar(filename, options?)
#### filename
Type: `string`
The filename for the output tar archive.
#### options
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.