Skip to content

petrbrzek/decompress-targz

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

tar.gz plugin for decompress

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%