Galerie und tage
This commit is contained in:
47
node_modules/gulp-decompress/index.js
generated
vendored
Normal file
47
node_modules/gulp-decompress/index.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
'use strict';
|
||||
|
||||
var archiveType = require('archive-type');
|
||||
var Decompress = require('decompress');
|
||||
var gutil = require('gulp-util');
|
||||
var Transform = require('readable-stream/transform');
|
||||
|
||||
module.exports = function (opts) {
|
||||
opts = opts || {};
|
||||
|
||||
return new Transform({
|
||||
objectMode: true,
|
||||
transform: function (file, enc, cb) {
|
||||
if (file.isNull()) {
|
||||
cb(null, file);
|
||||
return;
|
||||
}
|
||||
|
||||
if (file.isStream()) {
|
||||
cb(new gutil.PluginError('gulp-decompress', 'Streaming is not supported'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!archiveType(file.contents)) {
|
||||
cb(null, file);
|
||||
return;
|
||||
}
|
||||
|
||||
var decompress = new Decompress()
|
||||
.src(file.contents)
|
||||
.use(Decompress.tar(opts))
|
||||
.use(Decompress.tarbz2(opts))
|
||||
.use(Decompress.targz(opts))
|
||||
.use(Decompress.zip(opts));
|
||||
|
||||
decompress.run(function (err, files) {
|
||||
if (err) {
|
||||
cb(new gutil.PluginError('gulp-decompress:', err, {fileName: file.path}));
|
||||
return;
|
||||
}
|
||||
|
||||
files.forEach(this.push.bind(this));
|
||||
cb();
|
||||
}.bind(this));
|
||||
}
|
||||
});
|
||||
};
|
||||
21
node_modules/gulp-decompress/license
generated
vendored
Normal file
21
node_modules/gulp-decompress/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Kevin Mårtensson <kevinmartensson@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
44
node_modules/gulp-decompress/package.json
generated
vendored
Normal file
44
node_modules/gulp-decompress/package.json
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "gulp-decompress",
|
||||
"version": "1.2.0",
|
||||
"description": "Extract TAR, TAR.BZ2, TAR.GZ and ZIP archives",
|
||||
"license": "MIT",
|
||||
"repository": "kevva/gulp-decompress",
|
||||
"author": {
|
||||
"name": "Kevin Mårtensson",
|
||||
"email": "kevinmartensson@gmail.com",
|
||||
"url": "https://github.com/kevva"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && node test/test.js"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"bz2",
|
||||
"bzip2",
|
||||
"decompress",
|
||||
"extract",
|
||||
"gulpplugin",
|
||||
"tar",
|
||||
"tar.bz",
|
||||
"tar.gz",
|
||||
"unzip",
|
||||
"zip"
|
||||
],
|
||||
"dependencies": {
|
||||
"archive-type": "^3.0.0",
|
||||
"decompress": "^3.0.0",
|
||||
"gulp-util": "^3.0.1",
|
||||
"readable-stream": "^2.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^0.0.4",
|
||||
"is-jpg": "^1.0.0",
|
||||
"xo": "*"
|
||||
}
|
||||
}
|
||||
44
node_modules/gulp-decompress/readme.md
generated
vendored
Normal file
44
node_modules/gulp-decompress/readme.md
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
# gulp-decompress [](https://travis-ci.org/kevva/gulp-decompress)
|
||||
|
||||
> Extract TAR, TAR.BZ2, TAR.GZ and ZIP archives using [decompress](https://github.com/kevva/decompress)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save gulp-decompress
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var decompress = require('gulp-decompress');
|
||||
var gulp = require('gulp');
|
||||
|
||||
gulp.task('default', function () {
|
||||
return gulp.src('*.{tar,tar.bz2,tar.gz,zip}')
|
||||
.pipe(decompress({strip: 1}))
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## Options
|
||||
|
||||
### mode
|
||||
|
||||
Type: `string`
|
||||
|
||||
Set mode on the extracted files, i.e `{mode: '755'}`.
|
||||
|
||||
### strip
|
||||
|
||||
Type: `number`
|
||||
|
||||
Equivalent to `--strip-components` for tar.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Kevin Mårtensson](https://github.com/kevva)
|
||||
Reference in New Issue
Block a user