@stgdp/gulp-archiver
v1.0.0
Published
Create archives from files
Downloads
1
Maintainers
Readme
@stgdp/gulp-archiver
Adapted from gulp-tar
Create archives from files
Install
$ npm install --save-dev @stgdp/gulp-archiver
Usage
const gulp = require( 'gulp' )
const archiver = require( '@stgdp/gulp-archiver' )
const gzip = require( 'gulp-gzip' )
exports.default = () => (
gulp.src( 'src/*' )
.pipe( archiver( 'archive.tar' ) )
.pipe( gzip() )
.pipe( gulp.dest( 'dist' ) )
)
API
archiver(filename, format, options?)
filename
Type: string
Filename for the output archive.
format
Type: string
Format for the output tar archive. Can be zip
, tar
or json
options
Type: object
Default options passed to Archiver's constructor and merged into the data passed to its append
method.