forked from sseixas/gulp-tar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
33 lines (28 loc) · 818 Bytes
/
gulpfile.js
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
'use strict';
var gulp = require('gulp');
var gzip = require('gulp-gzip');
var tar = require('./');
gulp.task('default', function () {
// tar in buffer mode
gulp.src('fixture/fixture.txt')
.pipe(tar('test1.tar'))
.pipe(gulp.dest('dest'));
// tar in stream mode
gulp.src('fixture/fixture.txt', {buffer: false})
.pipe(tar('test2.tar'))
.pipe(gulp.dest('dest'));
// tar and gzip in buffer mode
gulp.src('fixture/fixture.txt')
.pipe(tar('test3.tar'))
.pipe(gzip())
.pipe(gulp.dest('dest'));
// tar and gzip in stream mode
gulp.src('fixture/fixture.txt', {buffer: false})
.pipe(tar('test4.tar'))
.pipe(gzip())
.pipe(gulp.dest('dest'));
// check default parameters for tar-stream
gulp.src('fixture/fixture.txt')
.pipe(tar('test_options.tar', {mtime: 0}))
.pipe(gulp.dest('dest'));
});