aboutsummaryrefslogtreecommitdiff
path: root/node_modules/gulp-zip
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/gulp-zip')
-rw-r--r--node_modules/gulp-zip/index.js75
-rw-r--r--node_modules/gulp-zip/license9
-rw-r--r--node_modules/gulp-zip/package.json45
-rw-r--r--node_modules/gulp-zip/readme.md58
4 files changed, 0 insertions, 187 deletions
diff --git a/node_modules/gulp-zip/index.js b/node_modules/gulp-zip/index.js
deleted file mode 100644
index 52794e451..000000000
--- a/node_modules/gulp-zip/index.js
+++ /dev/null
@@ -1,75 +0,0 @@
-'use strict';
-const path = require('path');
-const Vinyl = require('vinyl');
-const PluginError = require('plugin-error');
-const through = require('through2');
-const Yazl = require('yazl');
-const getStream = require('get-stream');
-
-module.exports = (filename, opts) => {
- if (!filename) {
- throw new PluginError('gulp-zip', '`filename` required');
- }
-
- opts = Object.assign({
- compress: true
- }, opts);
-
- let firstFile;
- const zip = new Yazl.ZipFile();
-
- return through.obj((file, enc, cb) => {
- if (!firstFile) {
- firstFile = file;
- }
-
- // Because Windows...
- const pathname = file.relative.replace(/\\/g, '/');
-
- if (!pathname) {
- cb();
- return;
- }
-
- if (file.isNull() && file.stat && file.stat.isDirectory && file.stat.isDirectory()) {
- zip.addEmptyDirectory(pathname, {
- mtime: opts.modifiedTime || file.stat.mtime || new Date(),
- mode: file.stat.mode
- });
- } else {
- const stat = {
- compress: opts.compress,
- mtime: opts.modifiedTime || (file.stat ? file.stat.mtime : new Date()),
- mode: file.stat ? file.stat.mode : null
- };
-
- if (file.isStream()) {
- zip.addReadStream(file.contents, pathname, stat);
- }
-
- if (file.isBuffer()) {
- zip.addBuffer(file.contents, pathname, stat);
- }
- }
-
- cb();
- }, function (cb) {
- if (!firstFile) {
- cb();
- return;
- }
-
- getStream.buffer(zip.outputStream).then(data => {
- this.push(new Vinyl({
- cwd: firstFile.cwd,
- base: firstFile.base,
- path: path.join(firstFile.base, filename),
- contents: data
- }));
-
- cb();
- });
-
- zip.end();
- });
-};
diff --git a/node_modules/gulp-zip/license b/node_modules/gulp-zip/license
deleted file mode 100644
index e7af2f771..000000000
--- a/node_modules/gulp-zip/license
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-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-zip/package.json b/node_modules/gulp-zip/package.json
deleted file mode 100644
index c2764aed0..000000000
--- a/node_modules/gulp-zip/package.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "name": "gulp-zip",
- "version": "4.2.0",
- "description": "ZIP compress files",
- "license": "MIT",
- "repository": "sindresorhus/gulp-zip",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "gulpplugin",
- "zip",
- "archive",
- "archiver",
- "compress",
- "compression",
- "file"
- ],
- "dependencies": {
- "get-stream": "^3.0.0",
- "plugin-error": "^0.1.2",
- "through2": "^2.0.1",
- "vinyl": "^2.1.0",
- "yazl": "^2.1.0"
- },
- "devDependencies": {
- "ava": "*",
- "decompress-unzip": "^3.0.0",
- "gulp": "^3.9.1",
- "vinyl-assign": "^1.2.1",
- "vinyl-file": "^3.0.0",
- "xo": "*"
- }
-}
diff --git a/node_modules/gulp-zip/readme.md b/node_modules/gulp-zip/readme.md
deleted file mode 100644
index 4ef9daa5e..000000000
--- a/node_modules/gulp-zip/readme.md
+++ /dev/null
@@ -1,58 +0,0 @@
-# gulp-zip [![Build Status](https://travis-ci.org/sindresorhus/gulp-zip.svg?branch=master)](https://travis-ci.org/sindresorhus/gulp-zip)
-
-> ZIP compress files
-
-
-## Install
-
-```
-$ npm install --save-dev gulp-zip
-```
-
-
-## Usage
-
-```js
-const gulp = require('gulp');
-const zip = require('gulp-zip');
-
-gulp.task('default', () =>
- gulp.src('src/*')
- .pipe(zip('archive.zip'))
- .pipe(gulp.dest('dist'))
-);
-```
-
-
-## API
-
-Supports [streaming mode](https://github.com/gulpjs/gulp/blob/master/docs/API.md#optionsbuffer).
-
-### zip(filename, [options])
-
-#### filename
-
-Type: `string`
-
-#### options
-
-Type: `Object`
-
-##### compress
-
-Type: `boolean`<br>
-Default: `true`
-
-##### modifiedTime
-
-Type: `Date`<br>
-Default: `undefined`
-
-Overrides the modification timestamp for all files added to the archive.
-
-Tip: Setting it to the same value across executions enables you to create stable archives—archives that change only when the contents of their entries change, regardless of whether those entries were "touched" or regenerated.
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)