wazuh-kibana-app/node_modules/gulp-gzip
2016-06-28 19:30:19 -07:00
..
examples Initial commit 2016-06-28 19:30:19 -07:00
lib Initial commit 2016-06-28 19:30:19 -07:00
node_modules Initial commit 2016-06-28 19:30:19 -07:00
test Initial commit 2016-06-28 19:30:19 -07:00
.npmignore Initial commit 2016-06-28 19:30:19 -07:00
gulpfile.js Initial commit 2016-06-28 19:30:19 -07:00
index.js Initial commit 2016-06-28 19:30:19 -07:00
LICENSE Initial commit 2016-06-28 19:30:19 -07:00
package.json Initial commit 2016-06-28 19:30:19 -07:00
README.md Initial commit 2016-06-28 19:30:19 -07:00

gulp-gzip

Gzip plugin for gulp.

#Install

npm install --save-dev gulp-gzip

#Options

append Boolean

Appends .gz file extension if true. Defaults to true.

 gzip({ append: true })

filename.txt becomes filename.txt.gz.

extension String

Appends an arbitrary extension to the filename. Disables append and preExtension options.

 gzip({ extension: 'zip' }) // note that the `.` should not be included in the extension

filename.txt becomes filename.txt.zip.

preExtension String

Appends an arbitrary pre-extension to the filename. Disables append and extension options.

 gzip({ preExtension: 'gz' }) // note that the `.` should not be included in the extension

filename.txt becomes filename.gz.txt.

threshold String|Number|Boolean

Minimum size required to compress a file. Defaults to false.

gzip({ threshold: '1kb' })
gzip({ threshold: 1024 })
gzip({ threshold: true })

gzipOptions Object

Options object to pass through to zlib.Gzip. See zlib documentation for more information.

gzip({ gzipOptions: { level: 9 } })
gzip({ gzipOptions: { memLevel: 1 } })

#Examples

var gulp = require('gulp');
var gzip = require('gulp-gzip');

gulp.task('compress', function() {
    gulp.src('./dev/scripts/*.js')
	.pipe(gzip())
	.pipe(gulp.dest('./public/scripts'));
});
var gulp = require('gulp');
var coffee = require('gulp-coffee');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var gzip = require('gulp-gzip');

gulp.task('deployScripts', function() {
	gulp.src('./dev/scripts/*.coffee')
	.pipe(coffee())
	.pipe(concat('all.js'))
	.pipe(uglify())
	.pipe(gzip())
	.pipe(gulp.dest('./public/scripts'));
});
var gulp = require('gulp');
var tar = require('gulp-tar');
var gzip = require('gulp-gzip');

gulp.task('tarball', function() {
	gulp.src('./files/*')
	.pipe(tar('archive.tar'))
	.pipe(gzip())
	.pipe(gulp.dest('.'));
});

More examples.