diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-10-10 03:43:44 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-10-10 03:43:44 +0200 |
commit | abd94a7f5a50f43c797a11b53549ae48fff667c3 (patch) | |
tree | ab8ed457f65cdd72e13e0571d2975729428f1551 /node_modules/gulp-tar | |
parent | a0247c6a3fd6a09a41a7e35a3441324c4dcb58be (diff) | |
download | wallet-core-abd94a7f5a50f43c797a11b53549ae48fff667c3.tar.xz |
add node_modules to address #4364
Diffstat (limited to 'node_modules/gulp-tar')
-rw-r--r-- | node_modules/gulp-tar/index.js | 50 | ||||
-rw-r--r-- | node_modules/gulp-tar/license | 21 | ||||
-rw-r--r-- | node_modules/gulp-tar/package.json | 115 | ||||
-rw-r--r-- | node_modules/gulp-tar/readme.md | 48 |
4 files changed, 234 insertions, 0 deletions
diff --git a/node_modules/gulp-tar/index.js b/node_modules/gulp-tar/index.js new file mode 100644 index 000000000..40ccbb3fd --- /dev/null +++ b/node_modules/gulp-tar/index.js @@ -0,0 +1,50 @@ +'use strict'; +var path = require('path'); +var gutil = require('gulp-util'); +var through = require('through2'); +var objectAssign = require('object-assign'); +var archiver = require('archiver'); + +module.exports = function (filename, opts) { + if (!filename) { + throw new gutil.PluginError('gulp-tar', '`filename` required'); + } + + var firstFile; + var archive = archiver('tar'); + + return through.obj(function (file, enc, cb) { + if (file.relative === '') { + cb(); + return; + } + + if (firstFile === undefined) { + firstFile = file; + } + + archive.append(file.contents, objectAssign({ + name: file.relative.replace(/\\/g, '/') + (file.isNull() ? '/' : ''), + mode: file.stat && file.stat.mode, + date: file.stat && file.stat.mtime ? file.stat.mtime : null + }, opts)); + + cb(); + }, function (cb) { + if (firstFile === undefined) { + cb(); + return; + } + + archive.finalize(); + + this.push(new gutil.File({ + cwd: firstFile.cwd, + base: firstFile.base, + path: path.join(firstFile.base, filename), + contents: archive + })); + + cb(); + }); +}; diff --git a/node_modules/gulp-tar/license b/node_modules/gulp-tar/license new file mode 100644 index 000000000..654d0bfe9 --- /dev/null +++ b/node_modules/gulp-tar/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.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. diff --git a/node_modules/gulp-tar/package.json b/node_modules/gulp-tar/package.json new file mode 100644 index 000000000..af664ffa8 --- /dev/null +++ b/node_modules/gulp-tar/package.json @@ -0,0 +1,115 @@ +{ + "_args": [ + [ + { + "raw": "gulp-tar@^1.8.0", + "scope": null, + "escapedName": "gulp-tar", + "name": "gulp-tar", + "rawSpec": "^1.8.0", + "spec": ">=1.8.0 <2.0.0", + "type": "range" + }, + "/home/dold/repos/taler/wallet-webex" + ] + ], + "_from": "gulp-tar@>=1.8.0 <2.0.0", + "_id": "gulp-tar@1.9.0", + "_inCache": true, + "_location": "/gulp-tar", + "_nodeVersion": "4.3.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/gulp-tar-1.9.0.tgz_1460103013799_0.3934360246639699" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "3.8.5", + "_phantomChildren": {}, + "_requested": { + "raw": "gulp-tar@^1.8.0", + "scope": null, + "escapedName": "gulp-tar", + "name": "gulp-tar", + "rawSpec": "^1.8.0", + "spec": ">=1.8.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "#DEV:/" + ], + "_resolved": "https://registry.npmjs.org/gulp-tar/-/gulp-tar-1.9.0.tgz", + "_shasum": "2747ae0a6b9d32b3fcb6a7bc96f33d5f2b4e405b", + "_shrinkwrap": null, + "_spec": "gulp-tar@^1.8.0", + "_where": "/home/dold/repos/taler/wallet-webex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/gulp-tar/issues" + }, + "dependencies": { + "archiver": "^1.0.0", + "gulp-util": "^3.0.0", + "object-assign": "^4.0.1", + "through2": "^2.0.0" + }, + "description": "Create tarball from files", + "devDependencies": { + "gulp": "*", + "gulp-gzip": "^1.2.0", + "mocha": "*", + "tar-stream": "^1.0.2", + "vinyl-map": "^1.0.1", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "2747ae0a6b9d32b3fcb6a7bc96f33d5f2b4e405b", + "tarball": "https://registry.npmjs.org/gulp-tar/-/gulp-tar-1.9.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "cbe4e1df44fdc477a3a9743cfb62ccb999748c16", + "homepage": "https://github.com/sindresorhus/gulp-tar#readme", + "keywords": [ + "gulpplugin", + "tar", + "tarball", + "archive", + "archiver", + "compress", + "compression", + "file", + "files", + "stream", + "streams" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "gulp-tar", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/gulp-tar.git" + }, + "scripts": { + "test": "xo && mocha" + }, + "version": "1.9.0" +} diff --git a/node_modules/gulp-tar/readme.md b/node_modules/gulp-tar/readme.md new file mode 100644 index 000000000..47c213132 --- /dev/null +++ b/node_modules/gulp-tar/readme.md @@ -0,0 +1,48 @@ +# gulp-tar [![Build Status](https://travis-ci.org/sindresorhus/gulp-tar.svg?branch=master)](https://travis-ci.org/sindresorhus/gulp-tar) + +> Create [tarball](http://en.wikipedia.org/wiki/Tar_(computing)) from files + + +## Install + +``` +$ npm install --save-dev gulp-tar +``` + + +## Usage + +```js +const gulp = require('gulp'); +const tar = require('gulp-tar'); +const gzip = require('gulp-gzip'); + +gulp.task('default', () => + gulp.src('src/*') + .pipe(tar('archive.tar')) + .pipe(gzip()) + .pipe(gulp.dest('dist')) +); +``` + + +## API + +### tar(filename, [options]) + +#### filename + +Type: `string` + +Filename for the output tar archive. + +#### options + +Type: `object` + +Default file headers passed to [tar-stream](https://github.com/mafintosh/tar-stream). + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) |