Galerie und tage
This commit is contained in:
74
node_modules/through2-concurrent/package.json
generated
vendored
74
node_modules/through2-concurrent/package.json
generated
vendored
@@ -1,50 +1,18 @@
|
||||
{
|
||||
"_from": "through2-concurrent@^2.0.0",
|
||||
"_id": "through2-concurrent@2.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-R5/jLkfMvdmDD+seLwN7vB+mhbqzWop5fAjx5IX8/yQq7VhBhzDmhXgaHAOnhnWkCpRMM7gToYHycB0CS/pd+A==",
|
||||
"_location": "/through2-concurrent",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "through2-concurrent@^2.0.0",
|
||||
"name": "through2-concurrent",
|
||||
"escapedName": "through2-concurrent",
|
||||
"rawSpec": "^2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-imagemin"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/through2-concurrent/-/through2-concurrent-2.0.0.tgz",
|
||||
"_shasum": "c9dd2c146504ec9962dbc86a5168b63d662669fa",
|
||||
"_spec": "through2-concurrent@^2.0.0",
|
||||
"_where": "/var/www/html/jason/WeihnachtenMelly/node_modules/gulp-imagemin",
|
||||
"author": {
|
||||
"name": "Thomas Parslow",
|
||||
"email": "tom@almostobsolete.net",
|
||||
"url": "http://almostobsolete.net/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/almost/through2-concurrent/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"through2": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"name": "through2-concurrent",
|
||||
"version": "1.1.1",
|
||||
"description": "Like through2 except runs in parallel with limited concurrency",
|
||||
"devDependencies": {
|
||||
"expect.js": "^0.3.1",
|
||||
"mocha": "^2.2.1",
|
||||
"underscore": "^1.8.2"
|
||||
},
|
||||
"main": "through2-concurrent.js",
|
||||
"files": [
|
||||
"through2-concurrent.js"
|
||||
],
|
||||
"homepage": "https://github.com/almost/through2-concurrent#readme",
|
||||
"scripts": {
|
||||
"test": "mocha tests.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/almost/through2-concurrent"
|
||||
},
|
||||
"keywords": [
|
||||
"through2",
|
||||
"streams",
|
||||
@@ -54,15 +22,21 @@
|
||||
"concurrency",
|
||||
"parallel"
|
||||
],
|
||||
"author": {
|
||||
"name": "Thomas Parslow",
|
||||
"email": "tom@almostobsolete.net",
|
||||
"url": "http://almostobsolete.net/"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "through2-concurrent.js",
|
||||
"name": "through2-concurrent",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/almost/through2-concurrent.git"
|
||||
"bugs": {
|
||||
"url": "https://github.com/almost/through2-concurrent/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha tests.js"
|
||||
"devDependencies": {
|
||||
"expect.js": "^0.3.1",
|
||||
"mocha": "^2.2.1",
|
||||
"underscore": "^1.8.2"
|
||||
},
|
||||
"version": "2.0.0"
|
||||
"dependencies": {
|
||||
"through2": "^2.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
49
node_modules/through2-concurrent/through2-concurrent.js
generated
vendored
49
node_modules/through2-concurrent/through2-concurrent.js
generated
vendored
@@ -3,12 +3,8 @@
|
||||
"use strict";
|
||||
var through2 = require('through2');
|
||||
|
||||
function cbNoop (cb) {
|
||||
cb();
|
||||
}
|
||||
|
||||
module.exports = function concurrentThrough (options, transform, flush) {
|
||||
var concurrent = 0, lastCallback = null, pendingFinish = null;
|
||||
var concurrent = 0, lastCallback = null, pendingFlush = null, concurrency;
|
||||
|
||||
if (typeof options === 'function') {
|
||||
flush = transform;
|
||||
@@ -49,41 +45,34 @@ module.exports = function concurrentThrough (options, transform, flush) {
|
||||
lastCallback = null;
|
||||
cb();
|
||||
}
|
||||
if (concurrent === 0 && pendingFinish) {
|
||||
pendingFinish();
|
||||
pendingFinish = null;
|
||||
if (concurrent === 0 && pendingFlush) {
|
||||
pendingFlush();
|
||||
pendingFlush = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// We need to pass in final to through2 even if the caller has
|
||||
// not given us a final option so that it will wait for all
|
||||
// transform callbacks to complete before emitting a "finish"
|
||||
// and "end" event.
|
||||
if (typeof options.final !== 'function') {
|
||||
options.final = cbNoop;
|
||||
}
|
||||
// We also wrap flush to make sure anyone using an ancient version
|
||||
// of through2 without support for final will get the old behaviour.
|
||||
// TODO: don't wrap flush after upgrading through2 to a version with guaranteed `_final`
|
||||
// Provide a default implementation of the 'flush' argument so that
|
||||
// the waiting code below can stay simple. We need to pass in flush
|
||||
// to through2 even if the caller has not given us a flush argument
|
||||
// so that it will wait for all transform callbacks to complete
|
||||
// before emitting an "end" event.
|
||||
if (typeof flush !== 'function') {
|
||||
flush = cbNoop;
|
||||
flush = function (callback) {
|
||||
callback();
|
||||
};
|
||||
}
|
||||
|
||||
// Flush is always called only after Final has finished
|
||||
// to ensure that data from Final gets processed, so we only need one pending callback at a time
|
||||
function callOnFinish (original) {
|
||||
return function (callback) {
|
||||
if (concurrent === 0) {
|
||||
original.call(this, callback);
|
||||
} else {
|
||||
pendingFinish = original.bind(this, callback);
|
||||
}
|
||||
function _flush (callback) {
|
||||
// Ensure that flush isn't called until all transforms are complete
|
||||
if (concurrent === 0) {
|
||||
flush.call(this,callback);
|
||||
} else {
|
||||
pendingFlush = flush.bind(this, callback);
|
||||
}
|
||||
}
|
||||
|
||||
options.final = callOnFinish(options.final);
|
||||
return through2(options, _transform, callOnFinish(flush));
|
||||
return through2(options, _transform, _flush);
|
||||
};
|
||||
|
||||
module.exports.obj = function (options, transform, flush) {
|
||||
|
||||
Reference in New Issue
Block a user