Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 1.01 KB

readme.md

File metadata and controls

56 lines (36 loc) · 1.01 KB

decompress-targz Build Status

tar.gz decompress plugin

Install

$ npm install --save decompress-targz

Usage

var Decompress = require('decompress');
var decompressTargz = require('decompress-targz');

new Decompress()
	.src('foo.tar.gz')
	.dest('dest')
	.use(decompressTargz({strip: 1}))
	.run();

You can also use this plugin with gulp:

var decompressTargz = require('decompress-targz');
var gulp = require('gulp');
var vinylAssign = require('vinyl-assign');

gulp.task('default', function () {
	return gulp.src('foo.tar.gz')
		.pipe(vinylAssign({extract: true}))
		.pipe(decompressTargz({strip: 1}))
		.pipe(gulp.dest('dest'));
});

API

decompressTargz(options)

options.strip

Type: number
Default: 0

Remove leading directory components from extracted files.

License

MIT © Kevin Mårtensson