style Dashboard
This commit is contained in:
20
node_modules/gulp-util/LICENSE
generated
vendored
Executable file
20
node_modules/gulp-util/LICENSE
generated
vendored
Executable file
@@ -0,0 +1,20 @@
|
||||
Copyright (c) 2014 Fractal <contact@wearefractal.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.
|
||||
145
node_modules/gulp-util/README.md
generated
vendored
Executable file
145
node_modules/gulp-util/README.md
generated
vendored
Executable file
@@ -0,0 +1,145 @@
|
||||
# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][depstat-image]][depstat-url]
|
||||
|
||||
## Information
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>Package</td><td>gulp-util</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>Utility functions for gulp plugins</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Node Version</td>
|
||||
<td>>= 0.10</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
var gutil = require('gulp-util');
|
||||
|
||||
gutil.log('stuff happened', 'Really it did', gutil.colors.magenta('123'));
|
||||
|
||||
gutil.replaceExtension('file.coffee', '.js'); // file.js
|
||||
|
||||
var opt = {
|
||||
name: 'todd',
|
||||
file: someGulpFile
|
||||
};
|
||||
gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js
|
||||
```
|
||||
|
||||
### log(msg...)
|
||||
|
||||
Logs stuff. Already prefixed with [gulp] and all that. If you pass in multiple arguments it will join them by a space.
|
||||
|
||||
The default gulp coloring using gutil.colors.<color>:
|
||||
```
|
||||
values (files, module names, etc.) = cyan
|
||||
numbers (times, counts, etc) = magenta
|
||||
```
|
||||
|
||||
### colors
|
||||
|
||||
Is an instance of [chalk](https://github.com/sindresorhus/chalk).
|
||||
|
||||
### replaceExtension(path, newExtension)
|
||||
|
||||
Replaces a file extension in a path. Returns the new path.
|
||||
|
||||
### isStream(obj)
|
||||
|
||||
Returns true or false if an object is a stream.
|
||||
|
||||
### isBuffer(obj)
|
||||
|
||||
Returns true or false if an object is a Buffer.
|
||||
|
||||
### template(string[, data])
|
||||
|
||||
This is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info.
|
||||
|
||||
## new File(obj)
|
||||
|
||||
This is just [vinyl](https://github.com/wearefractal/vinyl)
|
||||
|
||||
```javascript
|
||||
var file = new gutil.File({
|
||||
base: path.join(__dirname, './fixtures/'),
|
||||
cwd: __dirname,
|
||||
path: path.join(__dirname, './fixtures/test.coffee')
|
||||
});
|
||||
```
|
||||
|
||||
## noop()
|
||||
|
||||
Returns a stream that does nothing but pass data straight through.
|
||||
|
||||
```javascript
|
||||
// gulp should be called like this :
|
||||
// $ gulp --type production
|
||||
gulp.task('scripts', function() {
|
||||
gulp.src('src/**/*.js')
|
||||
.pipe(concat('script.js'))
|
||||
.pipe(gutil.env.type === 'production' ? uglify() : gutil.noop())
|
||||
.pipe(gulp.dest('dist/'));
|
||||
});
|
||||
```
|
||||
|
||||
## buffer(cb)
|
||||
|
||||
This is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects).
|
||||
|
||||
Returns a stream that can be piped to.
|
||||
|
||||
The stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback.
|
||||
|
||||
Callback is optional and receives two arguments: error and data
|
||||
|
||||
```javascript
|
||||
gulp.src('stuff/*.js')
|
||||
.pipe(gutil.buffer(function(err, files) {
|
||||
|
||||
}));
|
||||
```
|
||||
|
||||
## new PluginError(pluginName, message[, options])
|
||||
|
||||
- pluginName should be the module name of your plugin
|
||||
- message can be a string or an existing error
|
||||
- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.
|
||||
- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created.
|
||||
- Note that if you pass in a custom stack string you need to include the message along with that.
|
||||
- Error properties will be included in `err.toString()`. Can be omitted by including `{showProperties: false}` in the options.
|
||||
|
||||
These are all acceptable forms of instantiation:
|
||||
|
||||
```javascript
|
||||
var err = new gutil.PluginError('test', {
|
||||
message: 'something broke'
|
||||
});
|
||||
|
||||
var err = new gutil.PluginError({
|
||||
plugin: 'test',
|
||||
message: 'something broke'
|
||||
});
|
||||
|
||||
var err = new gutil.PluginError('test', 'something broke');
|
||||
|
||||
var err = new gutil.PluginError('test', 'something broke', {showStack: true});
|
||||
|
||||
var existingError = new Error('OMG');
|
||||
var err = new gutil.PluginError('test', existingError, {showStack: true});
|
||||
```
|
||||
|
||||
[npm-url]: https://www.npmjs.com/package/gulp-util
|
||||
[npm-image]: https://badge.fury.io/js/gulp-util.svg
|
||||
[travis-url]: https://travis-ci.org/gulpjs/gulp-util
|
||||
[travis-image]: https://img.shields.io/travis/gulpjs/gulp-util.svg?branch=master
|
||||
[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util
|
||||
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulp-util.svg
|
||||
[depstat-url]: https://david-dm.org/gulpjs/gulp-util
|
||||
[depstat-image]: https://david-dm.org/gulpjs/gulp-util.svg
|
||||
18
node_modules/gulp-util/index.js
generated
vendored
Executable file
18
node_modules/gulp-util/index.js
generated
vendored
Executable file
@@ -0,0 +1,18 @@
|
||||
module.exports = {
|
||||
File: require('vinyl'),
|
||||
replaceExtension: require('replace-ext'),
|
||||
colors: require('chalk'),
|
||||
date: require('dateformat'),
|
||||
log: require('./lib/log'),
|
||||
template: require('./lib/template'),
|
||||
env: require('./lib/env'),
|
||||
beep: require('beeper'),
|
||||
noop: require('./lib/noop'),
|
||||
isStream: require('./lib/isStream'),
|
||||
isBuffer: require('./lib/isBuffer'),
|
||||
isNull: require('./lib/isNull'),
|
||||
linefeed: '\n',
|
||||
combine: require('./lib/combine'),
|
||||
buffer: require('./lib/buffer'),
|
||||
PluginError: require('./lib/PluginError')
|
||||
};
|
||||
130
node_modules/gulp-util/lib/PluginError.js
generated
vendored
Executable file
130
node_modules/gulp-util/lib/PluginError.js
generated
vendored
Executable file
@@ -0,0 +1,130 @@
|
||||
var util = require('util');
|
||||
var arrayDiffer = require('array-differ');
|
||||
var arrayUniq = require('array-uniq');
|
||||
var chalk = require('chalk');
|
||||
var objectAssign = require('object-assign');
|
||||
|
||||
var nonEnumberableProperties = ['name', 'message', 'stack'];
|
||||
var propertiesNotToDisplay = nonEnumberableProperties.concat(['plugin', 'showStack', 'showProperties', '__safety', '_stack']);
|
||||
|
||||
// wow what a clusterfuck
|
||||
var parseOptions = function(plugin, message, opt) {
|
||||
opt = opt || {};
|
||||
if (typeof plugin === 'object') {
|
||||
opt = plugin;
|
||||
} else {
|
||||
if (message instanceof Error) {
|
||||
opt.error = message;
|
||||
} else if (typeof message === 'object') {
|
||||
opt = message;
|
||||
} else {
|
||||
opt.message = message;
|
||||
}
|
||||
opt.plugin = plugin;
|
||||
}
|
||||
|
||||
return objectAssign({
|
||||
showStack: false,
|
||||
showProperties: true
|
||||
}, opt);
|
||||
};
|
||||
|
||||
function PluginError(plugin, message, opt) {
|
||||
if (!(this instanceof PluginError)) throw new Error('Call PluginError using new');
|
||||
|
||||
Error.call(this);
|
||||
|
||||
var options = parseOptions(plugin, message, opt);
|
||||
var self = this;
|
||||
|
||||
// if options has an error, grab details from it
|
||||
if (options.error) {
|
||||
// These properties are not enumerable, so we have to add them explicitly.
|
||||
arrayUniq(Object.keys(options.error).concat(nonEnumberableProperties))
|
||||
.forEach(function(prop) {
|
||||
self[prop] = options.error[prop];
|
||||
});
|
||||
}
|
||||
|
||||
var properties = ['name', 'message', 'fileName', 'lineNumber', 'stack', 'showStack', 'showProperties', 'plugin'];
|
||||
|
||||
// options object can override
|
||||
properties.forEach(function(prop) {
|
||||
if (prop in options) this[prop] = options[prop];
|
||||
}, this);
|
||||
|
||||
// defaults
|
||||
if (!this.name) this.name = 'Error';
|
||||
|
||||
if (!this.stack) {
|
||||
// Error.captureStackTrace appends a stack property which relies on the toString method of the object it is applied to.
|
||||
// Since we are using our own toString method which controls when to display the stack trace if we don't go through this
|
||||
// safety object, then we'll get stack overflow problems.
|
||||
var safety = {
|
||||
toString: function() {
|
||||
return this._messageWithDetails() + '\nStack:';
|
||||
}.bind(this)
|
||||
};
|
||||
Error.captureStackTrace(safety, arguments.callee || this.constructor);
|
||||
this.__safety = safety;
|
||||
}
|
||||
|
||||
if (!this.plugin) throw new Error('Missing plugin name');
|
||||
if (!this.message) throw new Error('Missing error message');
|
||||
}
|
||||
|
||||
util.inherits(PluginError, Error);
|
||||
|
||||
PluginError.prototype._messageWithDetails = function() {
|
||||
var messageWithDetails = 'Message:\n ' + this.message;
|
||||
var details = this._messageDetails();
|
||||
|
||||
if (details !== '') {
|
||||
messageWithDetails += '\n' + details;
|
||||
}
|
||||
|
||||
return messageWithDetails;
|
||||
};
|
||||
|
||||
PluginError.prototype._messageDetails = function() {
|
||||
if (!this.showProperties) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var properties = arrayDiffer(Object.keys(this), propertiesNotToDisplay);
|
||||
|
||||
if (properties.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var self = this;
|
||||
properties = properties.map(function stringifyProperty(prop) {
|
||||
return ' ' + prop + ': ' + self[prop];
|
||||
});
|
||||
|
||||
return 'Details:\n' + properties.join('\n');
|
||||
};
|
||||
|
||||
PluginError.prototype.toString = function () {
|
||||
var sig = chalk.red(this.name) + ' in plugin \'' + chalk.cyan(this.plugin) + '\'';
|
||||
var detailsWithStack = function(stack) {
|
||||
return this._messageWithDetails() + '\nStack:\n' + stack;
|
||||
}.bind(this);
|
||||
|
||||
var msg;
|
||||
if (this.showStack) {
|
||||
if (this.__safety) { // There is no wrapped error, use the stack captured in the PluginError ctor
|
||||
msg = this.__safety.stack;
|
||||
} else if (this._stack) {
|
||||
msg = detailsWithStack(this._stack);
|
||||
} else { // Stack from wrapped error
|
||||
msg = detailsWithStack(this.stack);
|
||||
}
|
||||
} else {
|
||||
msg = this._messageWithDetails();
|
||||
}
|
||||
|
||||
return sig + '\n' + msg;
|
||||
};
|
||||
|
||||
module.exports = PluginError;
|
||||
15
node_modules/gulp-util/lib/buffer.js
generated
vendored
Executable file
15
node_modules/gulp-util/lib/buffer.js
generated
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
var through = require('through2');
|
||||
|
||||
module.exports = function(fn) {
|
||||
var buf = [];
|
||||
var end = function(cb) {
|
||||
this.push(buf);
|
||||
cb();
|
||||
if(fn) fn(null, buf);
|
||||
};
|
||||
var push = function(data, enc, cb) {
|
||||
buf.push(data);
|
||||
cb();
|
||||
};
|
||||
return through.obj(push, end);
|
||||
};
|
||||
11
node_modules/gulp-util/lib/combine.js
generated
vendored
Executable file
11
node_modules/gulp-util/lib/combine.js
generated
vendored
Executable file
@@ -0,0 +1,11 @@
|
||||
var pipeline = require('multipipe');
|
||||
|
||||
module.exports = function(){
|
||||
var args = arguments;
|
||||
if (args.length === 1 && Array.isArray(args[0])) {
|
||||
args = args[0];
|
||||
}
|
||||
return function(){
|
||||
return pipeline.apply(pipeline, args);
|
||||
};
|
||||
};
|
||||
4
node_modules/gulp-util/lib/env.js
generated
vendored
Executable file
4
node_modules/gulp-util/lib/env.js
generated
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
var parseArgs = require('minimist');
|
||||
var argv = parseArgs(process.argv.slice(2));
|
||||
|
||||
module.exports = argv;
|
||||
7
node_modules/gulp-util/lib/isBuffer.js
generated
vendored
Executable file
7
node_modules/gulp-util/lib/isBuffer.js
generated
vendored
Executable file
@@ -0,0 +1,7 @@
|
||||
var buf = require('buffer');
|
||||
var Buffer = buf.Buffer;
|
||||
|
||||
// could use Buffer.isBuffer but this is the same exact thing...
|
||||
module.exports = function(o) {
|
||||
return typeof o === 'object' && o instanceof Buffer;
|
||||
};
|
||||
3
node_modules/gulp-util/lib/isNull.js
generated
vendored
Executable file
3
node_modules/gulp-util/lib/isNull.js
generated
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
module.exports = function(v) {
|
||||
return v === null;
|
||||
};
|
||||
5
node_modules/gulp-util/lib/isStream.js
generated
vendored
Executable file
5
node_modules/gulp-util/lib/isStream.js
generated
vendored
Executable file
@@ -0,0 +1,5 @@
|
||||
var Stream = require('stream').Stream;
|
||||
|
||||
module.exports = function(o) {
|
||||
return !!o && o instanceof Stream;
|
||||
};
|
||||
14
node_modules/gulp-util/lib/log.js
generated
vendored
Executable file
14
node_modules/gulp-util/lib/log.js
generated
vendored
Executable file
@@ -0,0 +1,14 @@
|
||||
var hasGulplog = require('has-gulplog');
|
||||
|
||||
module.exports = function(){
|
||||
if(hasGulplog()){
|
||||
// specifically deferring loading here to keep from registering it globally
|
||||
var gulplog = require('gulplog');
|
||||
gulplog.info.apply(gulplog, arguments);
|
||||
} else {
|
||||
// specifically defering loading because it might not be used
|
||||
var fancylog = require('fancy-log');
|
||||
fancylog.apply(null, arguments);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
5
node_modules/gulp-util/lib/noop.js
generated
vendored
Executable file
5
node_modules/gulp-util/lib/noop.js
generated
vendored
Executable file
@@ -0,0 +1,5 @@
|
||||
var through = require('through2');
|
||||
|
||||
module.exports = function () {
|
||||
return through.obj();
|
||||
};
|
||||
23
node_modules/gulp-util/lib/template.js
generated
vendored
Executable file
23
node_modules/gulp-util/lib/template.js
generated
vendored
Executable file
@@ -0,0 +1,23 @@
|
||||
var template = require('lodash.template');
|
||||
var reEscape = require('lodash._reescape');
|
||||
var reEvaluate = require('lodash._reevaluate');
|
||||
var reInterpolate = require('lodash._reinterpolate');
|
||||
|
||||
var forcedSettings = {
|
||||
escape: reEscape,
|
||||
evaluate: reEvaluate,
|
||||
interpolate: reInterpolate
|
||||
};
|
||||
|
||||
module.exports = function(tmpl, data) {
|
||||
var fn = template(tmpl, forcedSettings);
|
||||
|
||||
var wrapped = function(o) {
|
||||
if (typeof o === 'undefined' || typeof o.file === 'undefined') {
|
||||
throw new Error('Failed to provide the current file as "file" to the template');
|
||||
}
|
||||
return fn(o);
|
||||
};
|
||||
|
||||
return (data ? wrapped(data) : wrapped);
|
||||
};
|
||||
21
node_modules/gulp-util/node_modules/clone-stats/LICENSE.md
generated
vendored
Normal file
21
node_modules/gulp-util/node_modules/clone-stats/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
## The MIT License (MIT) ##
|
||||
|
||||
Copyright (c) 2014 Hugh Kennedy
|
||||
|
||||
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.
|
||||
17
node_modules/gulp-util/node_modules/clone-stats/README.md
generated
vendored
Normal file
17
node_modules/gulp-util/node_modules/clone-stats/README.md
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# clone-stats [](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[](http://github.com/hughsk/stability-badges) #
|
||||
|
||||
Safely clone node's
|
||||
[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without
|
||||
losing their class methods, i.e. `stat.isDirectory()` and co.
|
||||
|
||||
## Usage ##
|
||||
|
||||
[](https://nodei.co/npm/clone-stats)
|
||||
|
||||
### `copy = require('clone-stats')(stat)` ###
|
||||
|
||||
Returns a clone of the original `fs.Stats` instance (`stat`).
|
||||
|
||||
## License ##
|
||||
|
||||
MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details.
|
||||
13
node_modules/gulp-util/node_modules/clone-stats/index.js
generated
vendored
Normal file
13
node_modules/gulp-util/node_modules/clone-stats/index.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
var Stat = require('fs').Stats
|
||||
|
||||
module.exports = cloneStats
|
||||
|
||||
function cloneStats(stats) {
|
||||
var replacement = new Stat
|
||||
|
||||
Object.keys(stats).forEach(function(key) {
|
||||
replacement[key] = stats[key]
|
||||
})
|
||||
|
||||
return replacement
|
||||
}
|
||||
64
node_modules/gulp-util/node_modules/clone-stats/package.json
generated
vendored
Normal file
64
node_modules/gulp-util/node_modules/clone-stats/package.json
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"clone-stats@0.0.1",
|
||||
"/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome/wp-content/plugins/opal-estate-pro"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "clone-stats@0.0.1",
|
||||
"_id": "clone-stats@0.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=",
|
||||
"_location": "/gulp-util/clone-stats",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "clone-stats@0.0.1",
|
||||
"name": "clone-stats",
|
||||
"escapedName": "clone-stats",
|
||||
"rawSpec": "0.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-util/vinyl"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz",
|
||||
"_spec": "0.0.1",
|
||||
"_where": "/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome/wp-content/plugins/opal-estate-pro",
|
||||
"author": {
|
||||
"name": "Hugh Kennedy",
|
||||
"email": "hughskennedy@gmail.com",
|
||||
"url": "http://hughsk.io/"
|
||||
},
|
||||
"browser": "index.js",
|
||||
"bugs": {
|
||||
"url": "https://github.com/hughsk/clone-stats/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Safely clone node's fs.Stats instances without losing their class methods",
|
||||
"devDependencies": {
|
||||
"tape": "~2.3.2"
|
||||
},
|
||||
"homepage": "https://github.com/hughsk/clone-stats",
|
||||
"keywords": [
|
||||
"stats",
|
||||
"fs",
|
||||
"clone",
|
||||
"copy",
|
||||
"prototype"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "clone-stats",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/hughsk/clone-stats.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test"
|
||||
},
|
||||
"version": "0.0.1"
|
||||
}
|
||||
36
node_modules/gulp-util/node_modules/clone-stats/test.js
generated
vendored
Normal file
36
node_modules/gulp-util/node_modules/clone-stats/test.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
var test = require('tape')
|
||||
var clone = require('./')
|
||||
var fs = require('fs')
|
||||
|
||||
test('file', function(t) {
|
||||
compare(t, fs.statSync(__filename))
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('directory', function(t) {
|
||||
compare(t, fs.statSync(__dirname))
|
||||
t.end()
|
||||
})
|
||||
|
||||
function compare(t, stat) {
|
||||
var copy = clone(stat)
|
||||
|
||||
t.deepEqual(stat, copy, 'clone has equal properties')
|
||||
t.ok(stat instanceof fs.Stats, 'original is an fs.Stat')
|
||||
t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat')
|
||||
|
||||
;['isDirectory'
|
||||
, 'isFile'
|
||||
, 'isBlockDevice'
|
||||
, 'isCharacterDevice'
|
||||
, 'isSymbolicLink'
|
||||
, 'isFIFO'
|
||||
, 'isSocket'
|
||||
].forEach(function(method) {
|
||||
t.equal(
|
||||
stat[method].call(stat)
|
||||
, copy[method].call(copy)
|
||||
, 'equal value for stat.' + method + '()'
|
||||
)
|
||||
})
|
||||
}
|
||||
4
node_modules/gulp-util/node_modules/clone/.npmignore
generated
vendored
Normal file
4
node_modules/gulp-util/node_modules/clone/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/node_modules/
|
||||
/test.js
|
||||
/*.html
|
||||
/.travis.yml
|
||||
18
node_modules/gulp-util/node_modules/clone/LICENSE
generated
vendored
Normal file
18
node_modules/gulp-util/node_modules/clone/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
Copyright © 2011-2015 Paul Vorbach <paul@vorba.ch>
|
||||
|
||||
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, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
126
node_modules/gulp-util/node_modules/clone/README.md
generated
vendored
Normal file
126
node_modules/gulp-util/node_modules/clone/README.md
generated
vendored
Normal file
@@ -0,0 +1,126 @@
|
||||
# clone
|
||||
|
||||
[](http://travis-ci.org/pvorb/node-clone)
|
||||
|
||||
[](http://npm-stat.com/charts.html?package=clone)
|
||||
|
||||
offers foolproof _deep cloning_ of objects, arrays, numbers, strings etc. in JavaScript.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
npm install clone
|
||||
|
||||
(It also works with browserify, ender or standalone.)
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
~~~ javascript
|
||||
var clone = require('clone');
|
||||
|
||||
var a, b;
|
||||
|
||||
a = { foo: { bar: 'baz' } }; // initial value of a
|
||||
|
||||
b = clone(a); // clone a -> b
|
||||
a.foo.bar = 'foo'; // change a
|
||||
|
||||
console.log(a); // show a
|
||||
console.log(b); // show b
|
||||
~~~
|
||||
|
||||
This will print:
|
||||
|
||||
~~~ javascript
|
||||
{ foo: { bar: 'foo' } }
|
||||
{ foo: { bar: 'baz' } }
|
||||
~~~
|
||||
|
||||
**clone** masters cloning simple objects (even with custom prototype), arrays,
|
||||
Date objects, and RegExp objects. Everything is cloned recursively, so that you
|
||||
can clone dates in arrays in objects, for example.
|
||||
|
||||
|
||||
## API
|
||||
|
||||
`clone(val, circular, depth)`
|
||||
|
||||
* `val` -- the value that you want to clone, any type allowed
|
||||
* `circular` -- boolean
|
||||
|
||||
Call `clone` with `circular` set to `false` if you are certain that `obj`
|
||||
contains no circular references. This will give better performance if needed.
|
||||
There is no error if `undefined` or `null` is passed as `obj`.
|
||||
* `depth` -- depth to which the object is to be cloned (optional,
|
||||
defaults to infinity)
|
||||
|
||||
`clone.clonePrototype(obj)`
|
||||
|
||||
* `obj` -- the object that you want to clone
|
||||
|
||||
Does a prototype clone as
|
||||
[described by Oran Looney](http://oranlooney.com/functional-javascript/).
|
||||
|
||||
|
||||
## Circular References
|
||||
|
||||
~~~ javascript
|
||||
var a, b;
|
||||
|
||||
a = { hello: 'world' };
|
||||
|
||||
a.myself = a;
|
||||
b = clone(a);
|
||||
|
||||
console.log(b);
|
||||
~~~
|
||||
|
||||
This will print:
|
||||
|
||||
~~~ javascript
|
||||
{ hello: "world", myself: [Circular] }
|
||||
~~~
|
||||
|
||||
So, `b.myself` points to `b`, not `a`. Neat!
|
||||
|
||||
|
||||
## Test
|
||||
|
||||
npm test
|
||||
|
||||
|
||||
## Caveat
|
||||
|
||||
Some special objects like a socket or `process.stdout`/`stderr` are known to not
|
||||
be cloneable. If you find other objects that cannot be cloned, please [open an
|
||||
issue](https://github.com/pvorb/node-clone/issues/new).
|
||||
|
||||
|
||||
## Bugs and Issues
|
||||
|
||||
If you encounter any bugs or issues, feel free to [open an issue at
|
||||
github](https://github.com/pvorb/node-clone/issues) or send me an email to
|
||||
<paul@vorba.ch>. I also always like to hear from you, if you’re using my code.
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2011-2015 [Paul Vorbach](http://paul.vorba.ch/) and
|
||||
[contributors](https://github.com/pvorb/node-clone/graphs/contributors).
|
||||
|
||||
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, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
10
node_modules/gulp-util/node_modules/clone/clone.iml
generated
vendored
Normal file
10
node_modules/gulp-util/node_modules/clone/clone.iml
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="clone node_modules" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
166
node_modules/gulp-util/node_modules/clone/clone.js
generated
vendored
Normal file
166
node_modules/gulp-util/node_modules/clone/clone.js
generated
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
var clone = (function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Clones (copies) an Object using deep copying.
|
||||
*
|
||||
* This function supports circular references by default, but if you are certain
|
||||
* there are no circular references in your object, you can save some CPU time
|
||||
* by calling clone(obj, false).
|
||||
*
|
||||
* Caution: if `circular` is false and `parent` contains circular references,
|
||||
* your program may enter an infinite loop and crash.
|
||||
*
|
||||
* @param `parent` - the object to be cloned
|
||||
* @param `circular` - set to true if the object to be cloned may contain
|
||||
* circular references. (optional - true by default)
|
||||
* @param `depth` - set to a number if the object is only to be cloned to
|
||||
* a particular depth. (optional - defaults to Infinity)
|
||||
* @param `prototype` - sets the prototype to be used when cloning an object.
|
||||
* (optional - defaults to parent prototype).
|
||||
*/
|
||||
function clone(parent, circular, depth, prototype) {
|
||||
var filter;
|
||||
if (typeof circular === 'object') {
|
||||
depth = circular.depth;
|
||||
prototype = circular.prototype;
|
||||
filter = circular.filter;
|
||||
circular = circular.circular
|
||||
}
|
||||
// maintain two arrays for circular references, where corresponding parents
|
||||
// and children have the same index
|
||||
var allParents = [];
|
||||
var allChildren = [];
|
||||
|
||||
var useBuffer = typeof Buffer != 'undefined';
|
||||
|
||||
if (typeof circular == 'undefined')
|
||||
circular = true;
|
||||
|
||||
if (typeof depth == 'undefined')
|
||||
depth = Infinity;
|
||||
|
||||
// recurse this function so we don't reset allParents and allChildren
|
||||
function _clone(parent, depth) {
|
||||
// cloning null always returns null
|
||||
if (parent === null)
|
||||
return null;
|
||||
|
||||
if (depth == 0)
|
||||
return parent;
|
||||
|
||||
var child;
|
||||
var proto;
|
||||
if (typeof parent != 'object') {
|
||||
return parent;
|
||||
}
|
||||
|
||||
if (clone.__isArray(parent)) {
|
||||
child = [];
|
||||
} else if (clone.__isRegExp(parent)) {
|
||||
child = new RegExp(parent.source, __getRegExpFlags(parent));
|
||||
if (parent.lastIndex) child.lastIndex = parent.lastIndex;
|
||||
} else if (clone.__isDate(parent)) {
|
||||
child = new Date(parent.getTime());
|
||||
} else if (useBuffer && Buffer.isBuffer(parent)) {
|
||||
if (Buffer.allocUnsafe) {
|
||||
// Node.js >= 4.5.0
|
||||
child = Buffer.allocUnsafe(parent.length);
|
||||
} else {
|
||||
// Older Node.js versions
|
||||
child = new Buffer(parent.length);
|
||||
}
|
||||
parent.copy(child);
|
||||
return child;
|
||||
} else {
|
||||
if (typeof prototype == 'undefined') {
|
||||
proto = Object.getPrototypeOf(parent);
|
||||
child = Object.create(proto);
|
||||
}
|
||||
else {
|
||||
child = Object.create(prototype);
|
||||
proto = prototype;
|
||||
}
|
||||
}
|
||||
|
||||
if (circular) {
|
||||
var index = allParents.indexOf(parent);
|
||||
|
||||
if (index != -1) {
|
||||
return allChildren[index];
|
||||
}
|
||||
allParents.push(parent);
|
||||
allChildren.push(child);
|
||||
}
|
||||
|
||||
for (var i in parent) {
|
||||
var attrs;
|
||||
if (proto) {
|
||||
attrs = Object.getOwnPropertyDescriptor(proto, i);
|
||||
}
|
||||
|
||||
if (attrs && attrs.set == null) {
|
||||
continue;
|
||||
}
|
||||
child[i] = _clone(parent[i], depth - 1);
|
||||
}
|
||||
|
||||
return child;
|
||||
}
|
||||
|
||||
return _clone(parent, depth);
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple flat clone using prototype, accepts only objects, usefull for property
|
||||
* override on FLAT configuration object (no nested props).
|
||||
*
|
||||
* USE WITH CAUTION! This may not behave as you wish if you do not know how this
|
||||
* works.
|
||||
*/
|
||||
clone.clonePrototype = function clonePrototype(parent) {
|
||||
if (parent === null)
|
||||
return null;
|
||||
|
||||
var c = function () {};
|
||||
c.prototype = parent;
|
||||
return new c();
|
||||
};
|
||||
|
||||
// private utility functions
|
||||
|
||||
function __objToStr(o) {
|
||||
return Object.prototype.toString.call(o);
|
||||
};
|
||||
clone.__objToStr = __objToStr;
|
||||
|
||||
function __isDate(o) {
|
||||
return typeof o === 'object' && __objToStr(o) === '[object Date]';
|
||||
};
|
||||
clone.__isDate = __isDate;
|
||||
|
||||
function __isArray(o) {
|
||||
return typeof o === 'object' && __objToStr(o) === '[object Array]';
|
||||
};
|
||||
clone.__isArray = __isArray;
|
||||
|
||||
function __isRegExp(o) {
|
||||
return typeof o === 'object' && __objToStr(o) === '[object RegExp]';
|
||||
};
|
||||
clone.__isRegExp = __isRegExp;
|
||||
|
||||
function __getRegExpFlags(re) {
|
||||
var flags = '';
|
||||
if (re.global) flags += 'g';
|
||||
if (re.ignoreCase) flags += 'i';
|
||||
if (re.multiline) flags += 'm';
|
||||
return flags;
|
||||
};
|
||||
clone.__getRegExpFlags = __getRegExpFlags;
|
||||
|
||||
return clone;
|
||||
})();
|
||||
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
module.exports = clone;
|
||||
}
|
||||
141
node_modules/gulp-util/node_modules/clone/package.json
generated
vendored
Normal file
141
node_modules/gulp-util/node_modules/clone/package.json
generated
vendored
Normal file
@@ -0,0 +1,141 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"clone@1.0.4",
|
||||
"/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome/wp-content/plugins/opal-estate-pro"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "clone@1.0.4",
|
||||
"_id": "clone@1.0.4",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
|
||||
"_location": "/gulp-util/clone",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "clone@1.0.4",
|
||||
"name": "clone",
|
||||
"escapedName": "clone",
|
||||
"rawSpec": "1.0.4",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.0.4"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-util/vinyl"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
|
||||
"_spec": "1.0.4",
|
||||
"_where": "/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome/wp-content/plugins/opal-estate-pro",
|
||||
"author": {
|
||||
"name": "Paul Vorbach",
|
||||
"email": "paul@vorba.ch",
|
||||
"url": "http://paul.vorba.ch/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/pvorb/node-clone/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Blake Miner",
|
||||
"email": "miner.blake@gmail.com",
|
||||
"url": "http://www.blakeminer.com/"
|
||||
},
|
||||
{
|
||||
"name": "Tian You",
|
||||
"email": "axqd001@gmail.com",
|
||||
"url": "http://blog.axqd.net/"
|
||||
},
|
||||
{
|
||||
"name": "George Stagas",
|
||||
"email": "gstagas@gmail.com",
|
||||
"url": "http://stagas.com/"
|
||||
},
|
||||
{
|
||||
"name": "Tobiasz Cudnik",
|
||||
"email": "tobiasz.cudnik@gmail.com",
|
||||
"url": "https://github.com/TobiaszCudnik"
|
||||
},
|
||||
{
|
||||
"name": "Pavel Lang",
|
||||
"email": "langpavel@phpskelet.org",
|
||||
"url": "https://github.com/langpavel"
|
||||
},
|
||||
{
|
||||
"name": "Dan MacTough",
|
||||
"url": "http://yabfog.com/"
|
||||
},
|
||||
{
|
||||
"name": "w1nk",
|
||||
"url": "https://github.com/w1nk"
|
||||
},
|
||||
{
|
||||
"name": "Hugh Kennedy",
|
||||
"url": "http://twitter.com/hughskennedy"
|
||||
},
|
||||
{
|
||||
"name": "Dustin Diaz",
|
||||
"url": "http://dustindiaz.com"
|
||||
},
|
||||
{
|
||||
"name": "Ilya Shaisultanov",
|
||||
"url": "https://github.com/diversario"
|
||||
},
|
||||
{
|
||||
"name": "Nathan MacInnes",
|
||||
"email": "nathan@macinn.es",
|
||||
"url": "http://macinn.es/"
|
||||
},
|
||||
{
|
||||
"name": "Benjamin E. Coe",
|
||||
"email": "ben@npmjs.com",
|
||||
"url": "https://twitter.com/benjamincoe"
|
||||
},
|
||||
{
|
||||
"name": "Nathan Zadoks",
|
||||
"url": "https://github.com/nathan7"
|
||||
},
|
||||
{
|
||||
"name": "Róbert Oroszi",
|
||||
"email": "robert+gh@oroszi.net",
|
||||
"url": "https://github.com/oroce"
|
||||
},
|
||||
{
|
||||
"name": "Aurélio A. Heckert",
|
||||
"url": "http://softwarelivre.org/aurium"
|
||||
},
|
||||
{
|
||||
"name": "Guy Ellis",
|
||||
"url": "http://www.guyellisrocks.com/"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"description": "deep cloning of objects and arrays",
|
||||
"devDependencies": {
|
||||
"nodeunit": "~0.9.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
},
|
||||
"homepage": "https://github.com/pvorb/node-clone#readme",
|
||||
"license": "MIT",
|
||||
"main": "clone.js",
|
||||
"name": "clone",
|
||||
"optionalDependencies": {},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/pvorb/node-clone.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "nodeunit test.js"
|
||||
},
|
||||
"tags": [
|
||||
"clone",
|
||||
"object",
|
||||
"array",
|
||||
"function",
|
||||
"date"
|
||||
],
|
||||
"version": "1.0.4"
|
||||
}
|
||||
8
node_modules/gulp-util/node_modules/minimist/.travis.yml
generated
vendored
Executable file
8
node_modules/gulp-util/node_modules/minimist/.travis.yml
generated
vendored
Executable file
@@ -0,0 +1,8 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "0.8"
|
||||
- "0.10"
|
||||
- "0.12"
|
||||
- "iojs"
|
||||
before_install:
|
||||
- npm install -g npm@~1.4.6
|
||||
18
node_modules/gulp-util/node_modules/minimist/LICENSE
generated
vendored
Executable file
18
node_modules/gulp-util/node_modules/minimist/LICENSE
generated
vendored
Executable file
@@ -0,0 +1,18 @@
|
||||
This software is released under the MIT license:
|
||||
|
||||
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.
|
||||
2
node_modules/gulp-util/node_modules/minimist/example/parse.js
generated
vendored
Executable file
2
node_modules/gulp-util/node_modules/minimist/example/parse.js
generated
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
var argv = require('../')(process.argv.slice(2));
|
||||
console.dir(argv);
|
||||
236
node_modules/gulp-util/node_modules/minimist/index.js
generated
vendored
Executable file
236
node_modules/gulp-util/node_modules/minimist/index.js
generated
vendored
Executable file
@@ -0,0 +1,236 @@
|
||||
module.exports = function (args, opts) {
|
||||
if (!opts) opts = {};
|
||||
|
||||
var flags = { bools : {}, strings : {}, unknownFn: null };
|
||||
|
||||
if (typeof opts['unknown'] === 'function') {
|
||||
flags.unknownFn = opts['unknown'];
|
||||
}
|
||||
|
||||
if (typeof opts['boolean'] === 'boolean' && opts['boolean']) {
|
||||
flags.allBools = true;
|
||||
} else {
|
||||
[].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
|
||||
flags.bools[key] = true;
|
||||
});
|
||||
}
|
||||
|
||||
var aliases = {};
|
||||
Object.keys(opts.alias || {}).forEach(function (key) {
|
||||
aliases[key] = [].concat(opts.alias[key]);
|
||||
aliases[key].forEach(function (x) {
|
||||
aliases[x] = [key].concat(aliases[key].filter(function (y) {
|
||||
return x !== y;
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
[].concat(opts.string).filter(Boolean).forEach(function (key) {
|
||||
flags.strings[key] = true;
|
||||
if (aliases[key]) {
|
||||
flags.strings[aliases[key]] = true;
|
||||
}
|
||||
});
|
||||
|
||||
var defaults = opts['default'] || {};
|
||||
|
||||
var argv = { _ : [] };
|
||||
Object.keys(flags.bools).forEach(function (key) {
|
||||
setArg(key, defaults[key] === undefined ? false : defaults[key]);
|
||||
});
|
||||
|
||||
var notFlags = [];
|
||||
|
||||
if (args.indexOf('--') !== -1) {
|
||||
notFlags = args.slice(args.indexOf('--')+1);
|
||||
args = args.slice(0, args.indexOf('--'));
|
||||
}
|
||||
|
||||
function argDefined(key, arg) {
|
||||
return (flags.allBools && /^--[^=]+$/.test(arg)) ||
|
||||
flags.strings[key] || flags.bools[key] || aliases[key];
|
||||
}
|
||||
|
||||
function setArg (key, val, arg) {
|
||||
if (arg && flags.unknownFn && !argDefined(key, arg)) {
|
||||
if (flags.unknownFn(arg) === false) return;
|
||||
}
|
||||
|
||||
var value = !flags.strings[key] && isNumber(val)
|
||||
? Number(val) : val
|
||||
;
|
||||
setKey(argv, key.split('.'), value);
|
||||
|
||||
(aliases[key] || []).forEach(function (x) {
|
||||
setKey(argv, x.split('.'), value);
|
||||
});
|
||||
}
|
||||
|
||||
function setKey (obj, keys, value) {
|
||||
var o = obj;
|
||||
keys.slice(0,-1).forEach(function (key) {
|
||||
if (o[key] === undefined) o[key] = {};
|
||||
o = o[key];
|
||||
});
|
||||
|
||||
var key = keys[keys.length - 1];
|
||||
if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') {
|
||||
o[key] = value;
|
||||
}
|
||||
else if (Array.isArray(o[key])) {
|
||||
o[key].push(value);
|
||||
}
|
||||
else {
|
||||
o[key] = [ o[key], value ];
|
||||
}
|
||||
}
|
||||
|
||||
function aliasIsBoolean(key) {
|
||||
return aliases[key].some(function (x) {
|
||||
return flags.bools[x];
|
||||
});
|
||||
}
|
||||
|
||||
for (var i = 0; i < args.length; i++) {
|
||||
var arg = args[i];
|
||||
|
||||
if (/^--.+=/.test(arg)) {
|
||||
// Using [\s\S] instead of . because js doesn't support the
|
||||
// 'dotall' regex modifier. See:
|
||||
// http://stackoverflow.com/a/1068308/13216
|
||||
var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
|
||||
var key = m[1];
|
||||
var value = m[2];
|
||||
if (flags.bools[key]) {
|
||||
value = value !== 'false';
|
||||
}
|
||||
setArg(key, value, arg);
|
||||
}
|
||||
else if (/^--no-.+/.test(arg)) {
|
||||
var key = arg.match(/^--no-(.+)/)[1];
|
||||
setArg(key, false, arg);
|
||||
}
|
||||
else if (/^--.+/.test(arg)) {
|
||||
var key = arg.match(/^--(.+)/)[1];
|
||||
var next = args[i + 1];
|
||||
if (next !== undefined && !/^-/.test(next)
|
||||
&& !flags.bools[key]
|
||||
&& !flags.allBools
|
||||
&& (aliases[key] ? !aliasIsBoolean(key) : true)) {
|
||||
setArg(key, next, arg);
|
||||
i++;
|
||||
}
|
||||
else if (/^(true|false)$/.test(next)) {
|
||||
setArg(key, next === 'true', arg);
|
||||
i++;
|
||||
}
|
||||
else {
|
||||
setArg(key, flags.strings[key] ? '' : true, arg);
|
||||
}
|
||||
}
|
||||
else if (/^-[^-]+/.test(arg)) {
|
||||
var letters = arg.slice(1,-1).split('');
|
||||
|
||||
var broken = false;
|
||||
for (var j = 0; j < letters.length; j++) {
|
||||
var next = arg.slice(j+2);
|
||||
|
||||
if (next === '-') {
|
||||
setArg(letters[j], next, arg)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) {
|
||||
setArg(letters[j], next.split('=')[1], arg);
|
||||
broken = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (/[A-Za-z]/.test(letters[j])
|
||||
&& /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
|
||||
setArg(letters[j], next, arg);
|
||||
broken = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (letters[j+1] && letters[j+1].match(/\W/)) {
|
||||
setArg(letters[j], arg.slice(j+2), arg);
|
||||
broken = true;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg);
|
||||
}
|
||||
}
|
||||
|
||||
var key = arg.slice(-1)[0];
|
||||
if (!broken && key !== '-') {
|
||||
if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
|
||||
&& !flags.bools[key]
|
||||
&& (aliases[key] ? !aliasIsBoolean(key) : true)) {
|
||||
setArg(key, args[i+1], arg);
|
||||
i++;
|
||||
}
|
||||
else if (args[i+1] && /true|false/.test(args[i+1])) {
|
||||
setArg(key, args[i+1] === 'true', arg);
|
||||
i++;
|
||||
}
|
||||
else {
|
||||
setArg(key, flags.strings[key] ? '' : true, arg);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
|
||||
argv._.push(
|
||||
flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
|
||||
);
|
||||
}
|
||||
if (opts.stopEarly) {
|
||||
argv._.push.apply(argv._, args.slice(i + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Object.keys(defaults).forEach(function (key) {
|
||||
if (!hasKey(argv, key.split('.'))) {
|
||||
setKey(argv, key.split('.'), defaults[key]);
|
||||
|
||||
(aliases[key] || []).forEach(function (x) {
|
||||
setKey(argv, x.split('.'), defaults[key]);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (opts['--']) {
|
||||
argv['--'] = new Array();
|
||||
notFlags.forEach(function(key) {
|
||||
argv['--'].push(key);
|
||||
});
|
||||
}
|
||||
else {
|
||||
notFlags.forEach(function(key) {
|
||||
argv._.push(key);
|
||||
});
|
||||
}
|
||||
|
||||
return argv;
|
||||
};
|
||||
|
||||
function hasKey (obj, keys) {
|
||||
var o = obj;
|
||||
keys.slice(0,-1).forEach(function (key) {
|
||||
o = (o[key] || {});
|
||||
});
|
||||
|
||||
var key = keys[keys.length - 1];
|
||||
return key in o;
|
||||
}
|
||||
|
||||
function isNumber (x) {
|
||||
if (typeof x === 'number') return true;
|
||||
if (/^0x[0-9a-f]+$/i.test(x)) return true;
|
||||
return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
|
||||
}
|
||||
|
||||
76
node_modules/gulp-util/node_modules/minimist/package.json
generated
vendored
Executable file
76
node_modules/gulp-util/node_modules/minimist/package.json
generated
vendored
Executable file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"minimist@1.2.0",
|
||||
"/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome"
|
||||
]
|
||||
],
|
||||
"_from": "minimist@1.2.0",
|
||||
"_id": "minimist@1.2.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||
"_location": "/gulp-util/minimist",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "minimist@1.2.0",
|
||||
"name": "minimist",
|
||||
"escapedName": "minimist",
|
||||
"rawSpec": "1.2.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.2.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-util"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||
"_spec": "1.2.0",
|
||||
"_where": "/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome",
|
||||
"author": {
|
||||
"name": "James Halliday",
|
||||
"email": "mail@substack.net",
|
||||
"url": "http://substack.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/substack/minimist/issues"
|
||||
},
|
||||
"description": "parse argument options",
|
||||
"devDependencies": {
|
||||
"covert": "^1.0.0",
|
||||
"tap": "~0.4.0",
|
||||
"tape": "^3.5.0"
|
||||
},
|
||||
"homepage": "https://github.com/substack/minimist",
|
||||
"keywords": [
|
||||
"argv",
|
||||
"getopt",
|
||||
"parser",
|
||||
"optimist"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "minimist",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/substack/minimist.git"
|
||||
},
|
||||
"scripts": {
|
||||
"coverage": "covert test/*.js",
|
||||
"test": "tap test/*.js"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": [
|
||||
"ie/6..latest",
|
||||
"ff/5",
|
||||
"firefox/latest",
|
||||
"chrome/10",
|
||||
"chrome/latest",
|
||||
"safari/5.1",
|
||||
"safari/latest",
|
||||
"opera/12"
|
||||
]
|
||||
},
|
||||
"version": "1.2.0"
|
||||
}
|
||||
91
node_modules/gulp-util/node_modules/minimist/readme.markdown
generated
vendored
Executable file
91
node_modules/gulp-util/node_modules/minimist/readme.markdown
generated
vendored
Executable file
@@ -0,0 +1,91 @@
|
||||
# minimist
|
||||
|
||||
parse argument options
|
||||
|
||||
This module is the guts of optimist's argument parser without all the
|
||||
fanciful decoration.
|
||||
|
||||
[](http://ci.testling.com/substack/minimist)
|
||||
|
||||
[](http://travis-ci.org/substack/minimist)
|
||||
|
||||
# example
|
||||
|
||||
``` js
|
||||
var argv = require('minimist')(process.argv.slice(2));
|
||||
console.dir(argv);
|
||||
```
|
||||
|
||||
```
|
||||
$ node example/parse.js -a beep -b boop
|
||||
{ _: [], a: 'beep', b: 'boop' }
|
||||
```
|
||||
|
||||
```
|
||||
$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
|
||||
{ _: [ 'foo', 'bar', 'baz' ],
|
||||
x: 3,
|
||||
y: 4,
|
||||
n: 5,
|
||||
a: true,
|
||||
b: true,
|
||||
c: true,
|
||||
beep: 'boop' }
|
||||
```
|
||||
|
||||
# methods
|
||||
|
||||
``` js
|
||||
var parseArgs = require('minimist')
|
||||
```
|
||||
|
||||
## var argv = parseArgs(args, opts={})
|
||||
|
||||
Return an argument object `argv` populated with the array arguments from `args`.
|
||||
|
||||
`argv._` contains all the arguments that didn't have an option associated with
|
||||
them.
|
||||
|
||||
Numeric-looking arguments will be returned as numbers unless `opts.string` or
|
||||
`opts.boolean` is set for that argument name.
|
||||
|
||||
Any arguments after `'--'` will not be parsed and will end up in `argv._`.
|
||||
|
||||
options can be:
|
||||
|
||||
* `opts.string` - a string or array of strings argument names to always treat as
|
||||
strings
|
||||
* `opts.boolean` - a boolean, string or array of strings to always treat as
|
||||
booleans. if `true` will treat all double hyphenated arguments without equal signs
|
||||
as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)
|
||||
* `opts.alias` - an object mapping string names to strings or arrays of string
|
||||
argument names to use as aliases
|
||||
* `opts.default` - an object mapping string argument names to default values
|
||||
* `opts.stopEarly` - when true, populate `argv._` with everything after the
|
||||
first non-option
|
||||
* `opts['--']` - when true, populate `argv._` with everything before the `--`
|
||||
and `argv['--']` with everything after the `--`. Here's an example:
|
||||
* `opts.unknown` - a function which is invoked with a command line parameter not
|
||||
defined in the `opts` configuration object. If the function returns `false`, the
|
||||
unknown option is not added to `argv`.
|
||||
|
||||
```
|
||||
> require('./')('one two three -- four five --six'.split(' '), { '--': true })
|
||||
{ _: [ 'one', 'two', 'three' ],
|
||||
'--': [ 'four', 'five', '--six' ] }
|
||||
```
|
||||
|
||||
Note that with `opts['--']` set, parsing for arguments still stops after the
|
||||
`--`.
|
||||
|
||||
# install
|
||||
|
||||
With [npm](https://npmjs.org) do:
|
||||
|
||||
```
|
||||
npm install minimist
|
||||
```
|
||||
|
||||
# license
|
||||
|
||||
MIT
|
||||
32
node_modules/gulp-util/node_modules/minimist/test/all_bool.js
generated
vendored
Executable file
32
node_modules/gulp-util/node_modules/minimist/test/all_bool.js
generated
vendored
Executable file
@@ -0,0 +1,32 @@
|
||||
var parse = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('flag boolean true (default all --args to boolean)', function (t) {
|
||||
var argv = parse(['moo', '--honk', 'cow'], {
|
||||
boolean: true
|
||||
});
|
||||
|
||||
t.deepEqual(argv, {
|
||||
honk: true,
|
||||
_: ['moo', 'cow']
|
||||
});
|
||||
|
||||
t.deepEqual(typeof argv.honk, 'boolean');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('flag boolean true only affects double hyphen arguments without equals signs', function (t) {
|
||||
var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], {
|
||||
boolean: true
|
||||
});
|
||||
|
||||
t.deepEqual(argv, {
|
||||
honk: true,
|
||||
tacos: 'good',
|
||||
p: 55,
|
||||
_: ['moo', 'cow']
|
||||
});
|
||||
|
||||
t.deepEqual(typeof argv.honk, 'boolean');
|
||||
t.end();
|
||||
});
|
||||
166
node_modules/gulp-util/node_modules/minimist/test/bool.js
generated
vendored
Executable file
166
node_modules/gulp-util/node_modules/minimist/test/bool.js
generated
vendored
Executable file
@@ -0,0 +1,166 @@
|
||||
var parse = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('flag boolean default false', function (t) {
|
||||
var argv = parse(['moo'], {
|
||||
boolean: ['t', 'verbose'],
|
||||
default: { verbose: false, t: false }
|
||||
});
|
||||
|
||||
t.deepEqual(argv, {
|
||||
verbose: false,
|
||||
t: false,
|
||||
_: ['moo']
|
||||
});
|
||||
|
||||
t.deepEqual(typeof argv.verbose, 'boolean');
|
||||
t.deepEqual(typeof argv.t, 'boolean');
|
||||
t.end();
|
||||
|
||||
});
|
||||
|
||||
test('boolean groups', function (t) {
|
||||
var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], {
|
||||
boolean: ['x','y','z']
|
||||
});
|
||||
|
||||
t.deepEqual(argv, {
|
||||
x : true,
|
||||
y : false,
|
||||
z : true,
|
||||
_ : [ 'one', 'two', 'three' ]
|
||||
});
|
||||
|
||||
t.deepEqual(typeof argv.x, 'boolean');
|
||||
t.deepEqual(typeof argv.y, 'boolean');
|
||||
t.deepEqual(typeof argv.z, 'boolean');
|
||||
t.end();
|
||||
});
|
||||
test('boolean and alias with chainable api', function (t) {
|
||||
var aliased = [ '-h', 'derp' ];
|
||||
var regular = [ '--herp', 'derp' ];
|
||||
var opts = {
|
||||
herp: { alias: 'h', boolean: true }
|
||||
};
|
||||
var aliasedArgv = parse(aliased, {
|
||||
boolean: 'herp',
|
||||
alias: { h: 'herp' }
|
||||
});
|
||||
var propertyArgv = parse(regular, {
|
||||
boolean: 'herp',
|
||||
alias: { h: 'herp' }
|
||||
});
|
||||
var expected = {
|
||||
herp: true,
|
||||
h: true,
|
||||
'_': [ 'derp' ]
|
||||
};
|
||||
|
||||
t.same(aliasedArgv, expected);
|
||||
t.same(propertyArgv, expected);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('boolean and alias with options hash', function (t) {
|
||||
var aliased = [ '-h', 'derp' ];
|
||||
var regular = [ '--herp', 'derp' ];
|
||||
var opts = {
|
||||
alias: { 'h': 'herp' },
|
||||
boolean: 'herp'
|
||||
};
|
||||
var aliasedArgv = parse(aliased, opts);
|
||||
var propertyArgv = parse(regular, opts);
|
||||
var expected = {
|
||||
herp: true,
|
||||
h: true,
|
||||
'_': [ 'derp' ]
|
||||
};
|
||||
t.same(aliasedArgv, expected);
|
||||
t.same(propertyArgv, expected);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('boolean and alias array with options hash', function (t) {
|
||||
var aliased = [ '-h', 'derp' ];
|
||||
var regular = [ '--herp', 'derp' ];
|
||||
var alt = [ '--harp', 'derp' ];
|
||||
var opts = {
|
||||
alias: { 'h': ['herp', 'harp'] },
|
||||
boolean: 'h'
|
||||
};
|
||||
var aliasedArgv = parse(aliased, opts);
|
||||
var propertyArgv = parse(regular, opts);
|
||||
var altPropertyArgv = parse(alt, opts);
|
||||
var expected = {
|
||||
harp: true,
|
||||
herp: true,
|
||||
h: true,
|
||||
'_': [ 'derp' ]
|
||||
};
|
||||
t.same(aliasedArgv, expected);
|
||||
t.same(propertyArgv, expected);
|
||||
t.same(altPropertyArgv, expected);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('boolean and alias using explicit true', function (t) {
|
||||
var aliased = [ '-h', 'true' ];
|
||||
var regular = [ '--herp', 'true' ];
|
||||
var opts = {
|
||||
alias: { h: 'herp' },
|
||||
boolean: 'h'
|
||||
};
|
||||
var aliasedArgv = parse(aliased, opts);
|
||||
var propertyArgv = parse(regular, opts);
|
||||
var expected = {
|
||||
herp: true,
|
||||
h: true,
|
||||
'_': [ ]
|
||||
};
|
||||
|
||||
t.same(aliasedArgv, expected);
|
||||
t.same(propertyArgv, expected);
|
||||
t.end();
|
||||
});
|
||||
|
||||
// regression, see https://github.com/substack/node-optimist/issues/71
|
||||
test('boolean and --x=true', function(t) {
|
||||
var parsed = parse(['--boool', '--other=true'], {
|
||||
boolean: 'boool'
|
||||
});
|
||||
|
||||
t.same(parsed.boool, true);
|
||||
t.same(parsed.other, 'true');
|
||||
|
||||
parsed = parse(['--boool', '--other=false'], {
|
||||
boolean: 'boool'
|
||||
});
|
||||
|
||||
t.same(parsed.boool, true);
|
||||
t.same(parsed.other, 'false');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('boolean --boool=true', function (t) {
|
||||
var parsed = parse(['--boool=true'], {
|
||||
default: {
|
||||
boool: false
|
||||
},
|
||||
boolean: ['boool']
|
||||
});
|
||||
|
||||
t.same(parsed.boool, true);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('boolean --boool=false', function (t) {
|
||||
var parsed = parse(['--boool=false'], {
|
||||
default: {
|
||||
boool: true
|
||||
},
|
||||
boolean: ['boool']
|
||||
});
|
||||
|
||||
t.same(parsed.boool, false);
|
||||
t.end();
|
||||
});
|
||||
31
node_modules/gulp-util/node_modules/minimist/test/dash.js
generated
vendored
Executable file
31
node_modules/gulp-util/node_modules/minimist/test/dash.js
generated
vendored
Executable file
@@ -0,0 +1,31 @@
|
||||
var parse = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('-', function (t) {
|
||||
t.plan(5);
|
||||
t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] });
|
||||
t.deepEqual(parse([ '-' ]), { _: [ '-' ] });
|
||||
t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] });
|
||||
t.deepEqual(
|
||||
parse([ '-b', '-' ], { boolean: 'b' }),
|
||||
{ b: true, _: [ '-' ] }
|
||||
);
|
||||
t.deepEqual(
|
||||
parse([ '-s', '-' ], { string: 's' }),
|
||||
{ s: '-', _: [] }
|
||||
);
|
||||
});
|
||||
|
||||
test('-a -- b', function (t) {
|
||||
t.plan(3);
|
||||
t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] });
|
||||
t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
|
||||
t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
|
||||
});
|
||||
|
||||
test('move arguments after the -- into their own `--` array', function(t) {
|
||||
t.plan(1);
|
||||
t.deepEqual(
|
||||
parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }),
|
||||
{ name: 'John', _: [ 'before' ], '--': [ 'after' ] });
|
||||
});
|
||||
35
node_modules/gulp-util/node_modules/minimist/test/default_bool.js
generated
vendored
Executable file
35
node_modules/gulp-util/node_modules/minimist/test/default_bool.js
generated
vendored
Executable file
@@ -0,0 +1,35 @@
|
||||
var test = require('tape');
|
||||
var parse = require('../');
|
||||
|
||||
test('boolean default true', function (t) {
|
||||
var argv = parse([], {
|
||||
boolean: 'sometrue',
|
||||
default: { sometrue: true }
|
||||
});
|
||||
t.equal(argv.sometrue, true);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('boolean default false', function (t) {
|
||||
var argv = parse([], {
|
||||
boolean: 'somefalse',
|
||||
default: { somefalse: false }
|
||||
});
|
||||
t.equal(argv.somefalse, false);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('boolean default to null', function (t) {
|
||||
var argv = parse([], {
|
||||
boolean: 'maybe',
|
||||
default: { maybe: null }
|
||||
});
|
||||
t.equal(argv.maybe, null);
|
||||
var argv = parse(['--maybe'], {
|
||||
boolean: 'maybe',
|
||||
default: { maybe: null }
|
||||
});
|
||||
t.equal(argv.maybe, true);
|
||||
t.end();
|
||||
|
||||
})
|
||||
22
node_modules/gulp-util/node_modules/minimist/test/dotted.js
generated
vendored
Executable file
22
node_modules/gulp-util/node_modules/minimist/test/dotted.js
generated
vendored
Executable file
@@ -0,0 +1,22 @@
|
||||
var parse = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('dotted alias', function (t) {
|
||||
var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
|
||||
t.equal(argv.a.b, 22);
|
||||
t.equal(argv.aa.bb, 22);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('dotted default', function (t) {
|
||||
var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
|
||||
t.equal(argv.a.b, 11);
|
||||
t.equal(argv.aa.bb, 11);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('dotted default with no alias', function (t) {
|
||||
var argv = parse('', {default: {'a.b': 11}});
|
||||
t.equal(argv.a.b, 11);
|
||||
t.end();
|
||||
});
|
||||
16
node_modules/gulp-util/node_modules/minimist/test/kv_short.js
generated
vendored
Executable file
16
node_modules/gulp-util/node_modules/minimist/test/kv_short.js
generated
vendored
Executable file
@@ -0,0 +1,16 @@
|
||||
var parse = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('short -k=v' , function (t) {
|
||||
t.plan(1);
|
||||
|
||||
var argv = parse([ '-b=123' ]);
|
||||
t.deepEqual(argv, { b: 123, _: [] });
|
||||
});
|
||||
|
||||
test('multi short -k=v' , function (t) {
|
||||
t.plan(1);
|
||||
|
||||
var argv = parse([ '-a=whatever', '-b=robots' ]);
|
||||
t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] });
|
||||
});
|
||||
31
node_modules/gulp-util/node_modules/minimist/test/long.js
generated
vendored
Executable file
31
node_modules/gulp-util/node_modules/minimist/test/long.js
generated
vendored
Executable file
@@ -0,0 +1,31 @@
|
||||
var test = require('tape');
|
||||
var parse = require('../');
|
||||
|
||||
test('long opts', function (t) {
|
||||
t.deepEqual(
|
||||
parse([ '--bool' ]),
|
||||
{ bool : true, _ : [] },
|
||||
'long boolean'
|
||||
);
|
||||
t.deepEqual(
|
||||
parse([ '--pow', 'xixxle' ]),
|
||||
{ pow : 'xixxle', _ : [] },
|
||||
'long capture sp'
|
||||
);
|
||||
t.deepEqual(
|
||||
parse([ '--pow=xixxle' ]),
|
||||
{ pow : 'xixxle', _ : [] },
|
||||
'long capture eq'
|
||||
);
|
||||
t.deepEqual(
|
||||
parse([ '--host', 'localhost', '--port', '555' ]),
|
||||
{ host : 'localhost', port : 555, _ : [] },
|
||||
'long captures sp'
|
||||
);
|
||||
t.deepEqual(
|
||||
parse([ '--host=localhost', '--port=555' ]),
|
||||
{ host : 'localhost', port : 555, _ : [] },
|
||||
'long captures eq'
|
||||
);
|
||||
t.end();
|
||||
});
|
||||
36
node_modules/gulp-util/node_modules/minimist/test/num.js
generated
vendored
Executable file
36
node_modules/gulp-util/node_modules/minimist/test/num.js
generated
vendored
Executable file
@@ -0,0 +1,36 @@
|
||||
var parse = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('nums', function (t) {
|
||||
var argv = parse([
|
||||
'-x', '1234',
|
||||
'-y', '5.67',
|
||||
'-z', '1e7',
|
||||
'-w', '10f',
|
||||
'--hex', '0xdeadbeef',
|
||||
'789'
|
||||
]);
|
||||
t.deepEqual(argv, {
|
||||
x : 1234,
|
||||
y : 5.67,
|
||||
z : 1e7,
|
||||
w : '10f',
|
||||
hex : 0xdeadbeef,
|
||||
_ : [ 789 ]
|
||||
});
|
||||
t.deepEqual(typeof argv.x, 'number');
|
||||
t.deepEqual(typeof argv.y, 'number');
|
||||
t.deepEqual(typeof argv.z, 'number');
|
||||
t.deepEqual(typeof argv.w, 'string');
|
||||
t.deepEqual(typeof argv.hex, 'number');
|
||||
t.deepEqual(typeof argv._[0], 'number');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('already a number', function (t) {
|
||||
var argv = parse([ '-x', 1234, 789 ]);
|
||||
t.deepEqual(argv, { x : 1234, _ : [ 789 ] });
|
||||
t.deepEqual(typeof argv.x, 'number');
|
||||
t.deepEqual(typeof argv._[0], 'number');
|
||||
t.end();
|
||||
});
|
||||
197
node_modules/gulp-util/node_modules/minimist/test/parse.js
generated
vendored
Executable file
197
node_modules/gulp-util/node_modules/minimist/test/parse.js
generated
vendored
Executable file
@@ -0,0 +1,197 @@
|
||||
var parse = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('parse args', function (t) {
|
||||
t.deepEqual(
|
||||
parse([ '--no-moo' ]),
|
||||
{ moo : false, _ : [] },
|
||||
'no'
|
||||
);
|
||||
t.deepEqual(
|
||||
parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]),
|
||||
{ v : ['a','b','c'], _ : [] },
|
||||
'multi'
|
||||
);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('comprehensive', function (t) {
|
||||
t.deepEqual(
|
||||
parse([
|
||||
'--name=meowmers', 'bare', '-cats', 'woo',
|
||||
'-h', 'awesome', '--multi=quux',
|
||||
'--key', 'value',
|
||||
'-b', '--bool', '--no-meep', '--multi=baz',
|
||||
'--', '--not-a-flag', 'eek'
|
||||
]),
|
||||
{
|
||||
c : true,
|
||||
a : true,
|
||||
t : true,
|
||||
s : 'woo',
|
||||
h : 'awesome',
|
||||
b : true,
|
||||
bool : true,
|
||||
key : 'value',
|
||||
multi : [ 'quux', 'baz' ],
|
||||
meep : false,
|
||||
name : 'meowmers',
|
||||
_ : [ 'bare', '--not-a-flag', 'eek' ]
|
||||
}
|
||||
);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('flag boolean', function (t) {
|
||||
var argv = parse([ '-t', 'moo' ], { boolean: 't' });
|
||||
t.deepEqual(argv, { t : true, _ : [ 'moo' ] });
|
||||
t.deepEqual(typeof argv.t, 'boolean');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('flag boolean value', function (t) {
|
||||
var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], {
|
||||
boolean: [ 't', 'verbose' ],
|
||||
default: { verbose: true }
|
||||
});
|
||||
|
||||
t.deepEqual(argv, {
|
||||
verbose: false,
|
||||
t: true,
|
||||
_: ['moo']
|
||||
});
|
||||
|
||||
t.deepEqual(typeof argv.verbose, 'boolean');
|
||||
t.deepEqual(typeof argv.t, 'boolean');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('newlines in params' , function (t) {
|
||||
var args = parse([ '-s', "X\nX" ])
|
||||
t.deepEqual(args, { _ : [], s : "X\nX" });
|
||||
|
||||
// reproduce in bash:
|
||||
// VALUE="new
|
||||
// line"
|
||||
// node program.js --s="$VALUE"
|
||||
args = parse([ "--s=X\nX" ])
|
||||
t.deepEqual(args, { _ : [], s : "X\nX" });
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('strings' , function (t) {
|
||||
var s = parse([ '-s', '0001234' ], { string: 's' }).s;
|
||||
t.equal(s, '0001234');
|
||||
t.equal(typeof s, 'string');
|
||||
|
||||
var x = parse([ '-x', '56' ], { string: 'x' }).x;
|
||||
t.equal(x, '56');
|
||||
t.equal(typeof x, 'string');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('stringArgs', function (t) {
|
||||
var s = parse([ ' ', ' ' ], { string: '_' })._;
|
||||
t.same(s.length, 2);
|
||||
t.same(typeof s[0], 'string');
|
||||
t.same(s[0], ' ');
|
||||
t.same(typeof s[1], 'string');
|
||||
t.same(s[1], ' ');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('empty strings', function(t) {
|
||||
var s = parse([ '-s' ], { string: 's' }).s;
|
||||
t.equal(s, '');
|
||||
t.equal(typeof s, 'string');
|
||||
|
||||
var str = parse([ '--str' ], { string: 'str' }).str;
|
||||
t.equal(str, '');
|
||||
t.equal(typeof str, 'string');
|
||||
|
||||
var letters = parse([ '-art' ], {
|
||||
string: [ 'a', 't' ]
|
||||
});
|
||||
|
||||
t.equal(letters.a, '');
|
||||
t.equal(letters.r, true);
|
||||
t.equal(letters.t, '');
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
||||
test('string and alias', function(t) {
|
||||
var x = parse([ '--str', '000123' ], {
|
||||
string: 's',
|
||||
alias: { s: 'str' }
|
||||
});
|
||||
|
||||
t.equal(x.str, '000123');
|
||||
t.equal(typeof x.str, 'string');
|
||||
t.equal(x.s, '000123');
|
||||
t.equal(typeof x.s, 'string');
|
||||
|
||||
var y = parse([ '-s', '000123' ], {
|
||||
string: 'str',
|
||||
alias: { str: 's' }
|
||||
});
|
||||
|
||||
t.equal(y.str, '000123');
|
||||
t.equal(typeof y.str, 'string');
|
||||
t.equal(y.s, '000123');
|
||||
t.equal(typeof y.s, 'string');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('slashBreak', function (t) {
|
||||
t.same(
|
||||
parse([ '-I/foo/bar/baz' ]),
|
||||
{ I : '/foo/bar/baz', _ : [] }
|
||||
);
|
||||
t.same(
|
||||
parse([ '-xyz/foo/bar/baz' ]),
|
||||
{ x : true, y : true, z : '/foo/bar/baz', _ : [] }
|
||||
);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('alias', function (t) {
|
||||
var argv = parse([ '-f', '11', '--zoom', '55' ], {
|
||||
alias: { z: 'zoom' }
|
||||
});
|
||||
t.equal(argv.zoom, 55);
|
||||
t.equal(argv.z, argv.zoom);
|
||||
t.equal(argv.f, 11);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('multiAlias', function (t) {
|
||||
var argv = parse([ '-f', '11', '--zoom', '55' ], {
|
||||
alias: { z: [ 'zm', 'zoom' ] }
|
||||
});
|
||||
t.equal(argv.zoom, 55);
|
||||
t.equal(argv.z, argv.zoom);
|
||||
t.equal(argv.z, argv.zm);
|
||||
t.equal(argv.f, 11);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('nested dotted objects', function (t) {
|
||||
var argv = parse([
|
||||
'--foo.bar', '3', '--foo.baz', '4',
|
||||
'--foo.quux.quibble', '5', '--foo.quux.o_O',
|
||||
'--beep.boop'
|
||||
]);
|
||||
|
||||
t.same(argv.foo, {
|
||||
bar : 3,
|
||||
baz : 4,
|
||||
quux : {
|
||||
quibble : 5,
|
||||
o_O : true
|
||||
}
|
||||
});
|
||||
t.same(argv.beep, { boop : true });
|
||||
t.end();
|
||||
});
|
||||
9
node_modules/gulp-util/node_modules/minimist/test/parse_modified.js
generated
vendored
Executable file
9
node_modules/gulp-util/node_modules/minimist/test/parse_modified.js
generated
vendored
Executable file
@@ -0,0 +1,9 @@
|
||||
var parse = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('parse with modifier functions' , function (t) {
|
||||
t.plan(1);
|
||||
|
||||
var argv = parse([ '-b', '123' ], { boolean: 'b' });
|
||||
t.deepEqual(argv, { b: true, _: [123] });
|
||||
});
|
||||
67
node_modules/gulp-util/node_modules/minimist/test/short.js
generated
vendored
Executable file
67
node_modules/gulp-util/node_modules/minimist/test/short.js
generated
vendored
Executable file
@@ -0,0 +1,67 @@
|
||||
var parse = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('numeric short args', function (t) {
|
||||
t.plan(2);
|
||||
t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] });
|
||||
t.deepEqual(
|
||||
parse([ '-123', '456' ]),
|
||||
{ 1: true, 2: true, 3: 456, _: [] }
|
||||
);
|
||||
});
|
||||
|
||||
test('short', function (t) {
|
||||
t.deepEqual(
|
||||
parse([ '-b' ]),
|
||||
{ b : true, _ : [] },
|
||||
'short boolean'
|
||||
);
|
||||
t.deepEqual(
|
||||
parse([ 'foo', 'bar', 'baz' ]),
|
||||
{ _ : [ 'foo', 'bar', 'baz' ] },
|
||||
'bare'
|
||||
);
|
||||
t.deepEqual(
|
||||
parse([ '-cats' ]),
|
||||
{ c : true, a : true, t : true, s : true, _ : [] },
|
||||
'group'
|
||||
);
|
||||
t.deepEqual(
|
||||
parse([ '-cats', 'meow' ]),
|
||||
{ c : true, a : true, t : true, s : 'meow', _ : [] },
|
||||
'short group next'
|
||||
);
|
||||
t.deepEqual(
|
||||
parse([ '-h', 'localhost' ]),
|
||||
{ h : 'localhost', _ : [] },
|
||||
'short capture'
|
||||
);
|
||||
t.deepEqual(
|
||||
parse([ '-h', 'localhost', '-p', '555' ]),
|
||||
{ h : 'localhost', p : 555, _ : [] },
|
||||
'short captures'
|
||||
);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('mixed short bool and capture', function (t) {
|
||||
t.same(
|
||||
parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
|
||||
{
|
||||
f : true, p : 555, h : 'localhost',
|
||||
_ : [ 'script.js' ]
|
||||
}
|
||||
);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('short and long', function (t) {
|
||||
t.deepEqual(
|
||||
parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
|
||||
{
|
||||
f : true, p : 555, h : 'localhost',
|
||||
_ : [ 'script.js' ]
|
||||
}
|
||||
);
|
||||
t.end();
|
||||
});
|
||||
15
node_modules/gulp-util/node_modules/minimist/test/stop_early.js
generated
vendored
Executable file
15
node_modules/gulp-util/node_modules/minimist/test/stop_early.js
generated
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
var parse = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('stops parsing on the first non-option when stopEarly is set', function (t) {
|
||||
var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], {
|
||||
stopEarly: true
|
||||
});
|
||||
|
||||
t.deepEqual(argv, {
|
||||
aaa: 'bbb',
|
||||
_: ['ccc', '--ddd']
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
102
node_modules/gulp-util/node_modules/minimist/test/unknown.js
generated
vendored
Executable file
102
node_modules/gulp-util/node_modules/minimist/test/unknown.js
generated
vendored
Executable file
@@ -0,0 +1,102 @@
|
||||
var parse = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('boolean and alias is not unknown', function (t) {
|
||||
var unknown = [];
|
||||
function unknownFn(arg) {
|
||||
unknown.push(arg);
|
||||
return false;
|
||||
}
|
||||
var aliased = [ '-h', 'true', '--derp', 'true' ];
|
||||
var regular = [ '--herp', 'true', '-d', 'true' ];
|
||||
var opts = {
|
||||
alias: { h: 'herp' },
|
||||
boolean: 'h',
|
||||
unknown: unknownFn
|
||||
};
|
||||
var aliasedArgv = parse(aliased, opts);
|
||||
var propertyArgv = parse(regular, opts);
|
||||
|
||||
t.same(unknown, ['--derp', '-d']);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('flag boolean true any double hyphen argument is not unknown', function (t) {
|
||||
var unknown = [];
|
||||
function unknownFn(arg) {
|
||||
unknown.push(arg);
|
||||
return false;
|
||||
}
|
||||
var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], {
|
||||
boolean: true,
|
||||
unknown: unknownFn
|
||||
});
|
||||
t.same(unknown, ['--tacos=good', 'cow', '-p']);
|
||||
t.same(argv, {
|
||||
honk: true,
|
||||
_: []
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('string and alias is not unknown', function (t) {
|
||||
var unknown = [];
|
||||
function unknownFn(arg) {
|
||||
unknown.push(arg);
|
||||
return false;
|
||||
}
|
||||
var aliased = [ '-h', 'hello', '--derp', 'goodbye' ];
|
||||
var regular = [ '--herp', 'hello', '-d', 'moon' ];
|
||||
var opts = {
|
||||
alias: { h: 'herp' },
|
||||
string: 'h',
|
||||
unknown: unknownFn
|
||||
};
|
||||
var aliasedArgv = parse(aliased, opts);
|
||||
var propertyArgv = parse(regular, opts);
|
||||
|
||||
t.same(unknown, ['--derp', '-d']);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('default and alias is not unknown', function (t) {
|
||||
var unknown = [];
|
||||
function unknownFn(arg) {
|
||||
unknown.push(arg);
|
||||
return false;
|
||||
}
|
||||
var aliased = [ '-h', 'hello' ];
|
||||
var regular = [ '--herp', 'hello' ];
|
||||
var opts = {
|
||||
default: { 'h': 'bar' },
|
||||
alias: { 'h': 'herp' },
|
||||
unknown: unknownFn
|
||||
};
|
||||
var aliasedArgv = parse(aliased, opts);
|
||||
var propertyArgv = parse(regular, opts);
|
||||
|
||||
t.same(unknown, []);
|
||||
t.end();
|
||||
unknownFn(); // exercise fn for 100% coverage
|
||||
});
|
||||
|
||||
test('value following -- is not unknown', function (t) {
|
||||
var unknown = [];
|
||||
function unknownFn(arg) {
|
||||
unknown.push(arg);
|
||||
return false;
|
||||
}
|
||||
var aliased = [ '--bad', '--', 'good', 'arg' ];
|
||||
var opts = {
|
||||
'--': true,
|
||||
unknown: unknownFn
|
||||
};
|
||||
var argv = parse(aliased, opts);
|
||||
|
||||
t.same(unknown, ['--bad']);
|
||||
t.same(argv, {
|
||||
'--': ['good', 'arg'],
|
||||
'_': []
|
||||
})
|
||||
t.end();
|
||||
});
|
||||
8
node_modules/gulp-util/node_modules/minimist/test/whitespace.js
generated
vendored
Executable file
8
node_modules/gulp-util/node_modules/minimist/test/whitespace.js
generated
vendored
Executable file
@@ -0,0 +1,8 @@
|
||||
var parse = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('whitespace should be whitespace' , function (t) {
|
||||
t.plan(1);
|
||||
var x = parse([ '-x', '\t' ]).x;
|
||||
t.equal(x, '\t');
|
||||
});
|
||||
39
node_modules/gulp-util/node_modules/object-assign/index.js
generated
vendored
Executable file
39
node_modules/gulp-util/node_modules/object-assign/index.js
generated
vendored
Executable file
@@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
|
||||
function ToObject(val) {
|
||||
if (val == null) {
|
||||
throw new TypeError('Object.assign cannot be called with null or undefined');
|
||||
}
|
||||
|
||||
return Object(val);
|
||||
}
|
||||
|
||||
function ownEnumerableKeys(obj) {
|
||||
var keys = Object.getOwnPropertyNames(obj);
|
||||
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
keys = keys.concat(Object.getOwnPropertySymbols(obj));
|
||||
}
|
||||
|
||||
return keys.filter(function (key) {
|
||||
return propIsEnumerable.call(obj, key);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = Object.assign || function (target, source) {
|
||||
var from;
|
||||
var keys;
|
||||
var to = ToObject(target);
|
||||
|
||||
for (var s = 1; s < arguments.length; s++) {
|
||||
from = arguments[s];
|
||||
keys = ownEnumerableKeys(Object(from));
|
||||
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
to[keys[i]] = from[keys[i]];
|
||||
}
|
||||
}
|
||||
|
||||
return to;
|
||||
};
|
||||
21
node_modules/gulp-util/node_modules/object-assign/license
generated
vendored
Executable file
21
node_modules/gulp-util/node_modules/object-assign/license
generated
vendored
Executable file
@@ -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.
|
||||
73
node_modules/gulp-util/node_modules/object-assign/package.json
generated
vendored
Executable file
73
node_modules/gulp-util/node_modules/object-assign/package.json
generated
vendored
Executable file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"object-assign@3.0.0",
|
||||
"/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome"
|
||||
]
|
||||
],
|
||||
"_from": "object-assign@3.0.0",
|
||||
"_id": "object-assign@3.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=",
|
||||
"_location": "/gulp-util/object-assign",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "object-assign@3.0.0",
|
||||
"name": "object-assign",
|
||||
"escapedName": "object-assign",
|
||||
"rawSpec": "3.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "3.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-util"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz",
|
||||
"_spec": "3.0.0",
|
||||
"_where": "/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/object-assign/issues"
|
||||
},
|
||||
"description": "ES6 Object.assign() ponyfill",
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/object-assign#readme",
|
||||
"keywords": [
|
||||
"object",
|
||||
"assign",
|
||||
"extend",
|
||||
"properties",
|
||||
"es6",
|
||||
"ecmascript",
|
||||
"harmony",
|
||||
"ponyfill",
|
||||
"prollyfill",
|
||||
"polyfill",
|
||||
"shim",
|
||||
"browser"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "object-assign",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/object-assign.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "3.0.0"
|
||||
}
|
||||
51
node_modules/gulp-util/node_modules/object-assign/readme.md
generated
vendored
Executable file
51
node_modules/gulp-util/node_modules/object-assign/readme.md
generated
vendored
Executable file
@@ -0,0 +1,51 @@
|
||||
# object-assign [](https://travis-ci.org/sindresorhus/object-assign)
|
||||
|
||||
> ES6 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill
|
||||
|
||||
> Ponyfill: A polyfill that doesn't overwrite the native method
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save object-assign
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var objectAssign = require('object-assign');
|
||||
|
||||
objectAssign({foo: 0}, {bar: 1});
|
||||
//=> {foo: 0, bar: 1}
|
||||
|
||||
// multiple sources
|
||||
objectAssign({foo: 0}, {bar: 1}, {baz: 2});
|
||||
//=> {foo: 0, bar: 1, baz: 2}
|
||||
|
||||
// overwrites equal keys
|
||||
objectAssign({foo: 0}, {foo: 1}, {foo: 2});
|
||||
//=> {foo: 2}
|
||||
|
||||
// ignores null and undefined sources
|
||||
objectAssign({foo: 0}, null, {bar: 1}, undefined);
|
||||
//=> {foo: 0, bar: 1}
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### objectAssign(target, source, [source, ...])
|
||||
|
||||
Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
|
||||
|
||||
|
||||
## Resources
|
||||
|
||||
- [ES6 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
6
node_modules/gulp-util/node_modules/replace-ext/.npmignore
generated
vendored
Normal file
6
node_modules/gulp-util/node_modules/replace-ext/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
.DS_Store
|
||||
*.log
|
||||
node_modules
|
||||
build
|
||||
*.node
|
||||
components
|
||||
8
node_modules/gulp-util/node_modules/replace-ext/.travis.yml
generated
vendored
Normal file
8
node_modules/gulp-util/node_modules/replace-ext/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "0.7"
|
||||
- "0.8"
|
||||
- "0.9"
|
||||
- "0.10"
|
||||
after_script:
|
||||
- npm run coveralls
|
||||
20
node_modules/gulp-util/node_modules/replace-ext/LICENSE
generated
vendored
Executable file
20
node_modules/gulp-util/node_modules/replace-ext/LICENSE
generated
vendored
Executable file
@@ -0,0 +1,20 @@
|
||||
Copyright (c) 2014 Fractal <contact@wearefractal.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-util/node_modules/replace-ext/README.md
generated
vendored
Normal file
44
node_modules/gulp-util/node_modules/replace-ext/README.md
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
# replace-ext [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url]
|
||||
|
||||
|
||||
## Information
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>Package</td><td>replace-ext</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>Replaces a file extension with another one</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Node Version</td>
|
||||
<td>>= 0.4</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
var replaceExt = require('replace-ext');
|
||||
|
||||
var path = '/some/dir/file.js';
|
||||
var npath = replaceExt(path, '.coffee');
|
||||
|
||||
console.log(npath); // /some/dir/file.coffee
|
||||
```
|
||||
|
||||
[npm-url]: https://npmjs.org/package/replace-ext
|
||||
[npm-image]: https://badge.fury.io/js/replace-ext.png
|
||||
|
||||
[travis-url]: https://travis-ci.org/wearefractal/replace-ext
|
||||
[travis-image]: https://travis-ci.org/wearefractal/replace-ext.png?branch=master
|
||||
|
||||
[coveralls-url]: https://coveralls.io/r/wearefractal/replace-ext
|
||||
[coveralls-image]: https://coveralls.io/repos/wearefractal/replace-ext/badge.png
|
||||
|
||||
[depstat-url]: https://david-dm.org/wearefractal/replace-ext
|
||||
[depstat-image]: https://david-dm.org/wearefractal/replace-ext.png
|
||||
|
||||
[david-url]: https://david-dm.org/wearefractal/replace-ext
|
||||
[david-image]: https://david-dm.org/wearefractal/replace-ext.png?theme=shields.io
|
||||
9
node_modules/gulp-util/node_modules/replace-ext/index.js
generated
vendored
Normal file
9
node_modules/gulp-util/node_modules/replace-ext/index.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
var path = require('path');
|
||||
|
||||
module.exports = function(npath, ext) {
|
||||
if (typeof npath !== 'string') return npath;
|
||||
if (npath.length === 0) return npath;
|
||||
|
||||
var nFileName = path.basename(npath, path.extname(npath))+ext;
|
||||
return path.join(path.dirname(npath), nFileName);
|
||||
};
|
||||
72
node_modules/gulp-util/node_modules/replace-ext/package.json
generated
vendored
Normal file
72
node_modules/gulp-util/node_modules/replace-ext/package.json
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"replace-ext@0.0.1",
|
||||
"/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome/wp-content/plugins/opal-estate-pro"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "replace-ext@0.0.1",
|
||||
"_id": "replace-ext@0.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=",
|
||||
"_location": "/gulp-util/replace-ext",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "replace-ext@0.0.1",
|
||||
"name": "replace-ext",
|
||||
"escapedName": "replace-ext",
|
||||
"rawSpec": "0.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-util",
|
||||
"/gulp-util/vinyl"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz",
|
||||
"_spec": "0.0.1",
|
||||
"_where": "/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome/wp-content/plugins/opal-estate-pro",
|
||||
"author": {
|
||||
"name": "Fractal",
|
||||
"email": "contact@wearefractal.com",
|
||||
"url": "http://wearefractal.com/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/wearefractal/replace-ext/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Replaces a file extension with another one",
|
||||
"devDependencies": {
|
||||
"coveralls": "~2.6.1",
|
||||
"istanbul": "~0.2.3",
|
||||
"jshint": "~2.4.1",
|
||||
"mocha": "~1.17.0",
|
||||
"mocha-lcov-reporter": "~0.0.1",
|
||||
"rimraf": "~2.2.5",
|
||||
"should": "~3.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"homepage": "http://github.com/wearefractal/replace-ext",
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "http://github.com/wearefractal/replace-ext/raw/master/LICENSE"
|
||||
}
|
||||
],
|
||||
"main": "./index.js",
|
||||
"name": "replace-ext",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/wearefractal/replace-ext.git"
|
||||
},
|
||||
"scripts": {
|
||||
"coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",
|
||||
"test": "mocha --reporter spec && jshint"
|
||||
},
|
||||
"version": "0.0.1"
|
||||
}
|
||||
51
node_modules/gulp-util/node_modules/replace-ext/test/main.js
generated
vendored
Normal file
51
node_modules/gulp-util/node_modules/replace-ext/test/main.js
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
var replaceExt = require('../');
|
||||
var path = require('path');
|
||||
var should = require('should');
|
||||
require('mocha');
|
||||
|
||||
describe('replace-ext', function() {
|
||||
it('should return a valid replaced extension on nested', function(done) {
|
||||
var fname = path.join(__dirname, './fixtures/test.coffee');
|
||||
var expected = path.join(__dirname, './fixtures/test.js');
|
||||
var nu = replaceExt(fname, '.js');
|
||||
should.exist(nu);
|
||||
nu.should.equal(expected);
|
||||
done();
|
||||
});
|
||||
|
||||
it('should return a valid replaced extension on flat', function(done) {
|
||||
var fname = 'test.coffee';
|
||||
var expected = 'test.js';
|
||||
var nu = replaceExt(fname, '.js');
|
||||
should.exist(nu);
|
||||
nu.should.equal(expected);
|
||||
done();
|
||||
});
|
||||
|
||||
it('should not return a valid replaced extension on empty string', function(done) {
|
||||
var fname = '';
|
||||
var expected = '';
|
||||
var nu = replaceExt(fname, '.js');
|
||||
should.exist(nu);
|
||||
nu.should.equal(expected);
|
||||
done();
|
||||
});
|
||||
|
||||
it('should return a valid removed extension on nested', function(done) {
|
||||
var fname = path.join(__dirname, './fixtures/test.coffee');
|
||||
var expected = path.join(__dirname, './fixtures/test');
|
||||
var nu = replaceExt(fname, '');
|
||||
should.exist(nu);
|
||||
nu.should.equal(expected);
|
||||
done();
|
||||
});
|
||||
|
||||
it('should return a valid added extension on nested', function(done) {
|
||||
var fname = path.join(__dirname, './fixtures/test');
|
||||
var expected = path.join(__dirname, './fixtures/test.js');
|
||||
var nu = replaceExt(fname, '.js');
|
||||
should.exist(nu);
|
||||
nu.should.equal(expected);
|
||||
done();
|
||||
});
|
||||
});
|
||||
9
node_modules/gulp-util/node_modules/through2/LICENSE.md
generated
vendored
Normal file
9
node_modules/gulp-util/node_modules/through2/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# The MIT License (MIT)
|
||||
|
||||
**Copyright (c) Rod Vagg (the "Original Author") and additional contributors**
|
||||
|
||||
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.
|
||||
134
node_modules/gulp-util/node_modules/through2/README.md
generated
vendored
Normal file
134
node_modules/gulp-util/node_modules/through2/README.md
generated
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
# through2
|
||||
|
||||
[](https://nodei.co/npm/through2/)
|
||||
|
||||
**A tiny wrapper around Node streams.Transform (Streams2/3) to avoid explicit subclassing noise**
|
||||
|
||||
Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.
|
||||
|
||||
Note: As 2.x.x this module starts using **Streams3** instead of Stream2. To continue using a Streams2 version use `npm install through2@0` to fetch the latest version of 0.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**.
|
||||
|
||||
```js
|
||||
fs.createReadStream('ex.txt')
|
||||
.pipe(through2(function (chunk, enc, callback) {
|
||||
for (var i = 0; i < chunk.length; i++)
|
||||
if (chunk[i] == 97)
|
||||
chunk[i] = 122 // swap 'a' for 'z'
|
||||
|
||||
this.push(chunk)
|
||||
|
||||
callback()
|
||||
}))
|
||||
.pipe(fs.createWriteStream('out.txt'))
|
||||
.on('finish', () => doSomethingSpecial())
|
||||
```
|
||||
|
||||
Or object streams:
|
||||
|
||||
```js
|
||||
var all = []
|
||||
|
||||
fs.createReadStream('data.csv')
|
||||
.pipe(csv2())
|
||||
.pipe(through2.obj(function (chunk, enc, callback) {
|
||||
var data = {
|
||||
name : chunk[0]
|
||||
, address : chunk[3]
|
||||
, phone : chunk[10]
|
||||
}
|
||||
this.push(data)
|
||||
|
||||
callback()
|
||||
}))
|
||||
.on('data', (data) => {
|
||||
all.push(data)
|
||||
})
|
||||
.on('end', () => {
|
||||
doSomethingSpecial(all)
|
||||
})
|
||||
```
|
||||
|
||||
Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.
|
||||
|
||||
## API
|
||||
|
||||
<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>
|
||||
|
||||
Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).
|
||||
|
||||
### options
|
||||
|
||||
The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).
|
||||
|
||||
The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:
|
||||
|
||||
```js
|
||||
fs.createReadStream('/tmp/important.dat')
|
||||
.pipe(through2({ objectMode: true, allowHalfOpen: false },
|
||||
(chunk, enc, cb) => {
|
||||
cb(null, 'wut?') // note we can use the second argument on the callback
|
||||
// to provide data as an alternative to this.push('wut?')
|
||||
}
|
||||
)
|
||||
.pipe(fs.createWriteStream('/tmp/wut.txt'))
|
||||
```
|
||||
|
||||
### transformFunction
|
||||
|
||||
The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.
|
||||
|
||||
To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on.
|
||||
|
||||
Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error.
|
||||
|
||||
If you **do not provide a `transformFunction`** then you will get a simple pass-through stream.
|
||||
|
||||
### flushFunction
|
||||
|
||||
The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.
|
||||
|
||||
```js
|
||||
fs.createReadStream('/tmp/important.dat')
|
||||
.pipe(through2(
|
||||
(chunk, enc, cb) => cb(null, chunk), // transform is a noop
|
||||
function (cb) { // flush function
|
||||
this.push('tacking on an extra buffer to the end');
|
||||
cb();
|
||||
}
|
||||
))
|
||||
.pipe(fs.createWriteStream('/tmp/wut.txt'));
|
||||
```
|
||||
|
||||
<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>
|
||||
|
||||
Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.
|
||||
|
||||
```js
|
||||
var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {
|
||||
if (record.temp != null && record.unit == "F") {
|
||||
record.temp = ( ( record.temp - 32 ) * 5 ) / 9
|
||||
record.unit = "C"
|
||||
}
|
||||
this.push(record)
|
||||
callback()
|
||||
})
|
||||
|
||||
// Create instances of FToC like so:
|
||||
var converter = new FToC()
|
||||
// Or:
|
||||
var converter = FToC()
|
||||
// Or specify/override options when you instantiate, if you prefer:
|
||||
var converter = FToC({objectMode: true})
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
- [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams.
|
||||
- [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams.
|
||||
- [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams.
|
||||
- [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies.
|
||||
- the [mississippi stream utility collection](https://github.com/maxogden/mississippi) includes `through2` as well as many more useful stream modules similar to this one
|
||||
|
||||
## License
|
||||
|
||||
**through2** is Copyright (c) Rod Vagg [@rvagg](https://twitter.com/rvagg) and additional contributors and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.
|
||||
70
node_modules/gulp-util/node_modules/through2/package.json
generated
vendored
Normal file
70
node_modules/gulp-util/node_modules/through2/package.json
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"through2@2.0.5",
|
||||
"/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome/wp-content/plugins/opal-estate-pro"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "through2@2.0.5",
|
||||
"_id": "through2@2.0.5",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
|
||||
"_location": "/gulp-util/through2",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "through2@2.0.5",
|
||||
"name": "through2",
|
||||
"escapedName": "through2",
|
||||
"rawSpec": "2.0.5",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.0.5"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-util"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
|
||||
"_spec": "2.0.5",
|
||||
"_where": "/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome/wp-content/plugins/opal-estate-pro",
|
||||
"author": {
|
||||
"name": "Rod Vagg",
|
||||
"email": "r@va.gg",
|
||||
"url": "https://github.com/rvagg"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/rvagg/through2/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"readable-stream": "~2.3.6",
|
||||
"xtend": "~4.0.1"
|
||||
},
|
||||
"description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise",
|
||||
"devDependencies": {
|
||||
"bl": "~2.0.1",
|
||||
"faucet": "0.0.1",
|
||||
"nyc": "~13.1.0",
|
||||
"safe-buffer": "~5.1.2",
|
||||
"stream-spigot": "~3.0.6",
|
||||
"tape": "~4.9.1"
|
||||
},
|
||||
"homepage": "https://github.com/rvagg/through2#readme",
|
||||
"keywords": [
|
||||
"stream",
|
||||
"streams2",
|
||||
"through",
|
||||
"transform"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "through2.js",
|
||||
"name": "through2",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/rvagg/through2.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test/test.js | faucet"
|
||||
},
|
||||
"version": "2.0.5"
|
||||
}
|
||||
96
node_modules/gulp-util/node_modules/through2/through2.js
generated
vendored
Normal file
96
node_modules/gulp-util/node_modules/through2/through2.js
generated
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
var Transform = require('readable-stream').Transform
|
||||
, inherits = require('util').inherits
|
||||
, xtend = require('xtend')
|
||||
|
||||
function DestroyableTransform(opts) {
|
||||
Transform.call(this, opts)
|
||||
this._destroyed = false
|
||||
}
|
||||
|
||||
inherits(DestroyableTransform, Transform)
|
||||
|
||||
DestroyableTransform.prototype.destroy = function(err) {
|
||||
if (this._destroyed) return
|
||||
this._destroyed = true
|
||||
|
||||
var self = this
|
||||
process.nextTick(function() {
|
||||
if (err)
|
||||
self.emit('error', err)
|
||||
self.emit('close')
|
||||
})
|
||||
}
|
||||
|
||||
// a noop _transform function
|
||||
function noop (chunk, enc, callback) {
|
||||
callback(null, chunk)
|
||||
}
|
||||
|
||||
|
||||
// create a new export function, used by both the main export and
|
||||
// the .ctor export, contains common logic for dealing with arguments
|
||||
function through2 (construct) {
|
||||
return function (options, transform, flush) {
|
||||
if (typeof options == 'function') {
|
||||
flush = transform
|
||||
transform = options
|
||||
options = {}
|
||||
}
|
||||
|
||||
if (typeof transform != 'function')
|
||||
transform = noop
|
||||
|
||||
if (typeof flush != 'function')
|
||||
flush = null
|
||||
|
||||
return construct(options, transform, flush)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// main export, just make me a transform stream!
|
||||
module.exports = through2(function (options, transform, flush) {
|
||||
var t2 = new DestroyableTransform(options)
|
||||
|
||||
t2._transform = transform
|
||||
|
||||
if (flush)
|
||||
t2._flush = flush
|
||||
|
||||
return t2
|
||||
})
|
||||
|
||||
|
||||
// make me a reusable prototype that I can `new`, or implicitly `new`
|
||||
// with a constructor call
|
||||
module.exports.ctor = through2(function (options, transform, flush) {
|
||||
function Through2 (override) {
|
||||
if (!(this instanceof Through2))
|
||||
return new Through2(override)
|
||||
|
||||
this.options = xtend(options, override)
|
||||
|
||||
DestroyableTransform.call(this, this.options)
|
||||
}
|
||||
|
||||
inherits(Through2, DestroyableTransform)
|
||||
|
||||
Through2.prototype._transform = transform
|
||||
|
||||
if (flush)
|
||||
Through2.prototype._flush = flush
|
||||
|
||||
return Through2
|
||||
})
|
||||
|
||||
|
||||
module.exports.obj = through2(function (options, transform, flush) {
|
||||
var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options))
|
||||
|
||||
t2._transform = transform
|
||||
|
||||
if (flush)
|
||||
t2._flush = flush
|
||||
|
||||
return t2
|
||||
})
|
||||
20
node_modules/gulp-util/node_modules/vinyl/LICENSE
generated
vendored
Normal file
20
node_modules/gulp-util/node_modules/vinyl/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
Copyright (c) 2013 Fractal <contact@wearefractal.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.
|
||||
195
node_modules/gulp-util/node_modules/vinyl/README.md
generated
vendored
Normal file
195
node_modules/gulp-util/node_modules/vinyl/README.md
generated
vendored
Normal file
@@ -0,0 +1,195 @@
|
||||
# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [](https://david-dm.org/wearefractal/vinyl)
|
||||
## Information
|
||||
<table><br><tr><br><td>Package</td><td>vinyl</td><br></tr><br><tr><br><td>Description</td><br><td>A virtual file format</td><br></tr><br><tr><br><td>Node Version</td><br><td>>= 0.9</td><br></tr><br></table>
|
||||
|
||||
## What is this?
|
||||
Read this for more info about how this plays into the grand scheme of things [https://medium.com/@eschoff/3828e8126466](https://medium.com/@eschoff/3828e8126466)
|
||||
|
||||
## File
|
||||
|
||||
```javascript
|
||||
var File = require('vinyl');
|
||||
|
||||
var coffeeFile = new File({
|
||||
cwd: "/",
|
||||
base: "/test/",
|
||||
path: "/test/file.coffee",
|
||||
contents: new Buffer("test = 123")
|
||||
});
|
||||
```
|
||||
|
||||
### isVinyl
|
||||
When checking if an object is a vinyl file, you should not use instanceof. Use the isVinyl function instead.
|
||||
|
||||
```js
|
||||
var File = require('vinyl');
|
||||
|
||||
var dummy = new File({stuff});
|
||||
var notAFile = {};
|
||||
|
||||
File.isVinyl(dummy); // true
|
||||
File.isVinyl(notAFile); // false
|
||||
```
|
||||
|
||||
### constructor(options)
|
||||
#### options.cwd
|
||||
Type: `String`<br><br>Default: `process.cwd()`
|
||||
|
||||
#### options.base
|
||||
Used for relative pathing. Typically where a glob starts.
|
||||
|
||||
Type: `String`<br><br>Default: `options.cwd`
|
||||
|
||||
#### options.path
|
||||
Full path to the file.
|
||||
|
||||
Type: `String`<br><br>Default: `undefined`
|
||||
|
||||
#### options.history
|
||||
Path history. Has no effect if `options.path` is passed.
|
||||
|
||||
Type: `Array`<br><br>Default: `options.path ? [options.path] : []`
|
||||
|
||||
#### options.stat
|
||||
The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information.
|
||||
|
||||
Type: `fs.Stats`<br><br>Default: `null`
|
||||
|
||||
#### options.contents
|
||||
File contents.
|
||||
|
||||
Type: `Buffer, Stream, or null`<br><br>Default: `null`
|
||||
|
||||
### isBuffer()
|
||||
Returns true if file.contents is a Buffer.
|
||||
|
||||
### isStream()
|
||||
Returns true if file.contents is a Stream.
|
||||
|
||||
### isNull()
|
||||
Returns true if file.contents is null.
|
||||
|
||||
### clone([opt])
|
||||
Returns a new File object with all attributes cloned.<br>By default custom attributes are deep-cloned.
|
||||
|
||||
If opt or opt.deep is false, custom attributes will not be deep-cloned.
|
||||
|
||||
If opt.contents is false, it will copy file.contents Buffer's reference.
|
||||
|
||||
### pipe(stream[, opt])
|
||||
If file.contents is a Buffer, it will write it to the stream.
|
||||
|
||||
If file.contents is a Stream, it will pipe it to the stream.
|
||||
|
||||
If file.contents is null, it will do nothing.
|
||||
|
||||
If opt.end is false, the destination stream will not be ended (same as node core).
|
||||
|
||||
Returns the stream.
|
||||
|
||||
### inspect()
|
||||
Returns a pretty String interpretation of the File. Useful for console.log.
|
||||
|
||||
### contents
|
||||
The [Stream](https://nodejs.org/api/stream.html#stream_stream) or [Buffer](https://nodejs.org/api/buffer.html#buffer_class_buffer) of the file as it was passed in via options, or as the result of modification.
|
||||
|
||||
For example:
|
||||
|
||||
```js
|
||||
if (file.isBuffer()) {
|
||||
console.log(file.contents.toString()); // logs out the string of contents
|
||||
}
|
||||
```
|
||||
|
||||
### path
|
||||
Absolute pathname string or `undefined`. Setting to a different value pushes the old value to `history`.
|
||||
|
||||
### history
|
||||
Array of `path` values the file object has had, from `history[0]` (original) through `history[history.length - 1]` (current). `history` and its elements should normally be treated as read-only and only altered indirectly by setting `path`.
|
||||
|
||||
### relative
|
||||
Returns path.relative for the file base and file path.
|
||||
|
||||
Example:
|
||||
|
||||
```javascript
|
||||
var file = new File({
|
||||
cwd: "/",
|
||||
base: "/test/",
|
||||
path: "/test/file.coffee"
|
||||
});
|
||||
|
||||
console.log(file.relative); // file.coffee
|
||||
```
|
||||
|
||||
### dirname
|
||||
Gets and sets path.dirname for the file path.
|
||||
|
||||
Example:
|
||||
|
||||
```javascript
|
||||
var file = new File({
|
||||
cwd: "/",
|
||||
base: "/test/",
|
||||
path: "/test/file.coffee"
|
||||
});
|
||||
|
||||
console.log(file.dirname); // /test
|
||||
|
||||
file.dirname = '/specs';
|
||||
|
||||
console.log(file.dirname); // /specs
|
||||
console.log(file.path); // /specs/file.coffee
|
||||
`
|
||||
```
|
||||
|
||||
### basename
|
||||
Gets and sets path.basename for the file path.
|
||||
|
||||
Example:
|
||||
|
||||
```javascript
|
||||
var file = new File({
|
||||
cwd: "/",
|
||||
base: "/test/",
|
||||
path: "/test/file.coffee"
|
||||
});
|
||||
|
||||
console.log(file.basename); // file.coffee
|
||||
|
||||
file.basename = 'file.js';
|
||||
|
||||
console.log(file.basename); // file.js
|
||||
console.log(file.path); // /test/file.js
|
||||
`
|
||||
```
|
||||
|
||||
### extname
|
||||
Gets and sets path.extname for the file path.
|
||||
|
||||
Example:
|
||||
|
||||
```javascript
|
||||
var file = new File({
|
||||
cwd: "/",
|
||||
base: "/test/",
|
||||
path: "/test/file.coffee"
|
||||
});
|
||||
|
||||
console.log(file.extname); // .coffee
|
||||
|
||||
file.extname = '.js';
|
||||
|
||||
console.log(file.extname); // .js
|
||||
console.log(file.path); // /test/file.js
|
||||
`
|
||||
```
|
||||
|
||||
[npm-url]: https://npmjs.org/package/vinyl
|
||||
[npm-image]: https://badge.fury.io/js/vinyl.png
|
||||
[travis-url]: https://travis-ci.org/wearefractal/vinyl
|
||||
[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master
|
||||
[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl
|
||||
[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png
|
||||
[depstat-url]: https://david-dm.org/wearefractal/vinyl
|
||||
[depstat-image]: https://david-dm.org/wearefractal/vinyl.png
|
||||
213
node_modules/gulp-util/node_modules/vinyl/index.js
generated
vendored
Normal file
213
node_modules/gulp-util/node_modules/vinyl/index.js
generated
vendored
Normal file
@@ -0,0 +1,213 @@
|
||||
var path = require('path');
|
||||
var clone = require('clone');
|
||||
var cloneStats = require('clone-stats');
|
||||
var cloneBuffer = require('./lib/cloneBuffer');
|
||||
var isBuffer = require('./lib/isBuffer');
|
||||
var isStream = require('./lib/isStream');
|
||||
var isNull = require('./lib/isNull');
|
||||
var inspectStream = require('./lib/inspectStream');
|
||||
var Stream = require('stream');
|
||||
var replaceExt = require('replace-ext');
|
||||
|
||||
function File(file) {
|
||||
if (!file) file = {};
|
||||
|
||||
// record path change
|
||||
var history = file.path ? [file.path] : file.history;
|
||||
this.history = history || [];
|
||||
|
||||
this.cwd = file.cwd || process.cwd();
|
||||
this.base = file.base || this.cwd;
|
||||
|
||||
// stat = files stats object
|
||||
this.stat = file.stat || null;
|
||||
|
||||
// contents = stream, buffer, or null if not read
|
||||
this.contents = file.contents || null;
|
||||
|
||||
this._isVinyl = true;
|
||||
}
|
||||
|
||||
File.prototype.isBuffer = function() {
|
||||
return isBuffer(this.contents);
|
||||
};
|
||||
|
||||
File.prototype.isStream = function() {
|
||||
return isStream(this.contents);
|
||||
};
|
||||
|
||||
File.prototype.isNull = function() {
|
||||
return isNull(this.contents);
|
||||
};
|
||||
|
||||
// TODO: should this be moved to vinyl-fs?
|
||||
File.prototype.isDirectory = function() {
|
||||
return this.isNull() && this.stat && this.stat.isDirectory();
|
||||
};
|
||||
|
||||
File.prototype.clone = function(opt) {
|
||||
if (typeof opt === 'boolean') {
|
||||
opt = {
|
||||
deep: opt,
|
||||
contents: true
|
||||
};
|
||||
} else if (!opt) {
|
||||
opt = {
|
||||
deep: true,
|
||||
contents: true
|
||||
};
|
||||
} else {
|
||||
opt.deep = opt.deep === true;
|
||||
opt.contents = opt.contents !== false;
|
||||
}
|
||||
|
||||
// clone our file contents
|
||||
var contents;
|
||||
if (this.isStream()) {
|
||||
contents = this.contents.pipe(new Stream.PassThrough());
|
||||
this.contents = this.contents.pipe(new Stream.PassThrough());
|
||||
} else if (this.isBuffer()) {
|
||||
contents = opt.contents ? cloneBuffer(this.contents) : this.contents;
|
||||
}
|
||||
|
||||
var file = new File({
|
||||
cwd: this.cwd,
|
||||
base: this.base,
|
||||
stat: (this.stat ? cloneStats(this.stat) : null),
|
||||
history: this.history.slice(),
|
||||
contents: contents
|
||||
});
|
||||
|
||||
// clone our custom properties
|
||||
Object.keys(this).forEach(function(key) {
|
||||
// ignore built-in fields
|
||||
if (key === '_contents' || key === 'stat' ||
|
||||
key === 'history' || key === 'path' ||
|
||||
key === 'base' || key === 'cwd') {
|
||||
return;
|
||||
}
|
||||
file[key] = opt.deep ? clone(this[key], true) : this[key];
|
||||
}, this);
|
||||
return file;
|
||||
};
|
||||
|
||||
File.prototype.pipe = function(stream, opt) {
|
||||
if (!opt) opt = {};
|
||||
if (typeof opt.end === 'undefined') opt.end = true;
|
||||
|
||||
if (this.isStream()) {
|
||||
return this.contents.pipe(stream, opt);
|
||||
}
|
||||
if (this.isBuffer()) {
|
||||
if (opt.end) {
|
||||
stream.end(this.contents);
|
||||
} else {
|
||||
stream.write(this.contents);
|
||||
}
|
||||
return stream;
|
||||
}
|
||||
|
||||
// isNull
|
||||
if (opt.end) stream.end();
|
||||
return stream;
|
||||
};
|
||||
|
||||
File.prototype.inspect = function() {
|
||||
var inspect = [];
|
||||
|
||||
// use relative path if possible
|
||||
var filePath = (this.base && this.path) ? this.relative : this.path;
|
||||
|
||||
if (filePath) {
|
||||
inspect.push('"'+filePath+'"');
|
||||
}
|
||||
|
||||
if (this.isBuffer()) {
|
||||
inspect.push(this.contents.inspect());
|
||||
}
|
||||
|
||||
if (this.isStream()) {
|
||||
inspect.push(inspectStream(this.contents));
|
||||
}
|
||||
|
||||
return '<File '+inspect.join(' ')+'>';
|
||||
};
|
||||
|
||||
File.isVinyl = function(file) {
|
||||
return file && file._isVinyl === true;
|
||||
};
|
||||
|
||||
// virtual attributes
|
||||
// or stuff with extra logic
|
||||
Object.defineProperty(File.prototype, 'contents', {
|
||||
get: function() {
|
||||
return this._contents;
|
||||
},
|
||||
set: function(val) {
|
||||
if (!isBuffer(val) && !isStream(val) && !isNull(val)) {
|
||||
throw new Error('File.contents can only be a Buffer, a Stream, or null.');
|
||||
}
|
||||
this._contents = val;
|
||||
}
|
||||
});
|
||||
|
||||
// TODO: should this be moved to vinyl-fs?
|
||||
Object.defineProperty(File.prototype, 'relative', {
|
||||
get: function() {
|
||||
if (!this.base) throw new Error('No base specified! Can not get relative.');
|
||||
if (!this.path) throw new Error('No path specified! Can not get relative.');
|
||||
return path.relative(this.base, this.path);
|
||||
},
|
||||
set: function() {
|
||||
throw new Error('File.relative is generated from the base and path attributes. Do not modify it.');
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(File.prototype, 'dirname', {
|
||||
get: function() {
|
||||
if (!this.path) throw new Error('No path specified! Can not get dirname.');
|
||||
return path.dirname(this.path);
|
||||
},
|
||||
set: function(dirname) {
|
||||
if (!this.path) throw new Error('No path specified! Can not set dirname.');
|
||||
this.path = path.join(dirname, path.basename(this.path));
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(File.prototype, 'basename', {
|
||||
get: function() {
|
||||
if (!this.path) throw new Error('No path specified! Can not get basename.');
|
||||
return path.basename(this.path);
|
||||
},
|
||||
set: function(basename) {
|
||||
if (!this.path) throw new Error('No path specified! Can not set basename.');
|
||||
this.path = path.join(path.dirname(this.path), basename);
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(File.prototype, 'extname', {
|
||||
get: function() {
|
||||
if (!this.path) throw new Error('No path specified! Can not get extname.');
|
||||
return path.extname(this.path);
|
||||
},
|
||||
set: function(extname) {
|
||||
if (!this.path) throw new Error('No path specified! Can not set extname.');
|
||||
this.path = replaceExt(this.path, extname);
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(File.prototype, 'path', {
|
||||
get: function() {
|
||||
return this.history[this.history.length - 1];
|
||||
},
|
||||
set: function(path) {
|
||||
if (typeof path !== 'string') throw new Error('path should be string');
|
||||
|
||||
// record history only when path changed
|
||||
if (path && path !== this.path) {
|
||||
this.history.push(path);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = File;
|
||||
7
node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js
generated
vendored
Normal file
7
node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
var Buffer = require('buffer').Buffer;
|
||||
|
||||
module.exports = function(buf) {
|
||||
var out = new Buffer(buf.length);
|
||||
buf.copy(out);
|
||||
return out;
|
||||
};
|
||||
11
node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js
generated
vendored
Normal file
11
node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
var isStream = require('./isStream');
|
||||
|
||||
module.exports = function(stream) {
|
||||
if (!isStream(stream)) return;
|
||||
|
||||
var streamType = stream.constructor.name;
|
||||
// avoid StreamStream
|
||||
if (streamType === 'Stream') streamType = '';
|
||||
|
||||
return '<'+streamType+'Stream>';
|
||||
};
|
||||
1
node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js
generated
vendored
Normal file
1
node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('buffer').Buffer.isBuffer;
|
||||
3
node_modules/gulp-util/node_modules/vinyl/lib/isNull.js
generated
vendored
Normal file
3
node_modules/gulp-util/node_modules/vinyl/lib/isNull.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = function(v) {
|
||||
return v === null;
|
||||
};
|
||||
5
node_modules/gulp-util/node_modules/vinyl/lib/isStream.js
generated
vendored
Normal file
5
node_modules/gulp-util/node_modules/vinyl/lib/isStream.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
var Stream = require('stream').Stream;
|
||||
|
||||
module.exports = function(o) {
|
||||
return !!o && o instanceof Stream;
|
||||
};
|
||||
76
node_modules/gulp-util/node_modules/vinyl/package.json
generated
vendored
Normal file
76
node_modules/gulp-util/node_modules/vinyl/package.json
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"vinyl@0.5.3",
|
||||
"/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome/wp-content/plugins/opal-estate-pro"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "vinyl@0.5.3",
|
||||
"_id": "vinyl@0.5.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=",
|
||||
"_location": "/gulp-util/vinyl",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "vinyl@0.5.3",
|
||||
"name": "vinyl",
|
||||
"escapedName": "vinyl",
|
||||
"rawSpec": "0.5.3",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.5.3"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-util"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz",
|
||||
"_spec": "0.5.3",
|
||||
"_where": "/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome/wp-content/plugins/opal-estate-pro",
|
||||
"author": {
|
||||
"name": "Fractal",
|
||||
"email": "contact@wearefractal.com",
|
||||
"url": "http://wearefractal.com/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/wearefractal/vinyl/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"clone": "^1.0.0",
|
||||
"clone-stats": "^0.0.1",
|
||||
"replace-ext": "0.0.1"
|
||||
},
|
||||
"description": "A virtual file format",
|
||||
"devDependencies": {
|
||||
"buffer-equal": "0.0.1",
|
||||
"event-stream": "^3.1.0",
|
||||
"istanbul": "^0.3.0",
|
||||
"istanbul-coveralls": "^1.0.1",
|
||||
"jshint": "^2.4.1",
|
||||
"lodash.templatesettings": "^3.1.0",
|
||||
"mocha": "^2.0.0",
|
||||
"rimraf": "^2.2.5",
|
||||
"should": "^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.9"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"lib"
|
||||
],
|
||||
"homepage": "http://github.com/wearefractal/vinyl",
|
||||
"license": "MIT",
|
||||
"main": "./index.js",
|
||||
"name": "vinyl",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/wearefractal/vinyl.git"
|
||||
},
|
||||
"scripts": {
|
||||
"coveralls": "istanbul cover _mocha && istanbul-coveralls",
|
||||
"test": "mocha && jshint lib"
|
||||
},
|
||||
"version": "0.5.3"
|
||||
}
|
||||
30
node_modules/gulp-util/node_modules/xtend/.jshintrc
generated
vendored
Normal file
30
node_modules/gulp-util/node_modules/xtend/.jshintrc
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"maxdepth": 4,
|
||||
"maxstatements": 200,
|
||||
"maxcomplexity": 12,
|
||||
"maxlen": 80,
|
||||
"maxparams": 5,
|
||||
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"immed": true,
|
||||
"latedef": false,
|
||||
"noarg": true,
|
||||
"noempty": true,
|
||||
"nonew": true,
|
||||
"undef": true,
|
||||
"unused": "vars",
|
||||
"trailing": true,
|
||||
|
||||
"quotmark": true,
|
||||
"expr": true,
|
||||
"asi": true,
|
||||
|
||||
"browser": false,
|
||||
"esnext": true,
|
||||
"devel": false,
|
||||
"node": false,
|
||||
"nonstandard": false,
|
||||
|
||||
"predef": ["require", "module", "__dirname", "__filename"]
|
||||
}
|
||||
20
node_modules/gulp-util/node_modules/xtend/LICENSE
generated
vendored
Normal file
20
node_modules/gulp-util/node_modules/xtend/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
Copyright (c) 2012-2014 Raynos.
|
||||
|
||||
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.
|
||||
32
node_modules/gulp-util/node_modules/xtend/README.md
generated
vendored
Normal file
32
node_modules/gulp-util/node_modules/xtend/README.md
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# xtend
|
||||
|
||||
[![browser support][3]][4]
|
||||
|
||||
[](http://github.com/badges/stability-badges)
|
||||
|
||||
Extend like a boss
|
||||
|
||||
xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence.
|
||||
|
||||
## Examples
|
||||
|
||||
```js
|
||||
var extend = require("xtend")
|
||||
|
||||
// extend returns a new object. Does not mutate arguments
|
||||
var combination = extend({
|
||||
a: "a",
|
||||
b: "c"
|
||||
}, {
|
||||
b: "b"
|
||||
})
|
||||
// { a: "a", b: "b" }
|
||||
```
|
||||
|
||||
## Stability status: Locked
|
||||
|
||||
## MIT Licensed
|
||||
|
||||
|
||||
[3]: http://ci.testling.com/Raynos/xtend.png
|
||||
[4]: http://ci.testling.com/Raynos/xtend
|
||||
19
node_modules/gulp-util/node_modules/xtend/immutable.js
generated
vendored
Normal file
19
node_modules/gulp-util/node_modules/xtend/immutable.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
module.exports = extend
|
||||
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
|
||||
function extend() {
|
||||
var target = {}
|
||||
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var source = arguments[i]
|
||||
|
||||
for (var key in source) {
|
||||
if (hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target
|
||||
}
|
||||
17
node_modules/gulp-util/node_modules/xtend/mutable.js
generated
vendored
Normal file
17
node_modules/gulp-util/node_modules/xtend/mutable.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
module.exports = extend
|
||||
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
|
||||
function extend(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i]
|
||||
|
||||
for (var key in source) {
|
||||
if (hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target
|
||||
}
|
||||
90
node_modules/gulp-util/node_modules/xtend/package.json
generated
vendored
Normal file
90
node_modules/gulp-util/node_modules/xtend/package.json
generated
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"xtend@4.0.2",
|
||||
"/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome/wp-content/plugins/opal-estate-pro"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "xtend@4.0.2",
|
||||
"_id": "xtend@4.0.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
|
||||
"_location": "/gulp-util/xtend",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "xtend@4.0.2",
|
||||
"name": "xtend",
|
||||
"escapedName": "xtend",
|
||||
"rawSpec": "4.0.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "4.0.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-util/through2"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||
"_spec": "4.0.2",
|
||||
"_where": "/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome/wp-content/plugins/opal-estate-pro",
|
||||
"author": {
|
||||
"name": "Raynos",
|
||||
"email": "raynos2@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/Raynos/xtend/issues",
|
||||
"email": "raynos2@gmail.com"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Jake Verbaten"
|
||||
},
|
||||
{
|
||||
"name": "Matt Esch"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"description": "extend like a boss",
|
||||
"devDependencies": {
|
||||
"tape": "~1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.4"
|
||||
},
|
||||
"homepage": "https://github.com/Raynos/xtend",
|
||||
"keywords": [
|
||||
"extend",
|
||||
"merge",
|
||||
"options",
|
||||
"opts",
|
||||
"object",
|
||||
"array"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "immutable",
|
||||
"name": "xtend",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/Raynos/xtend.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test.js",
|
||||
"browsers": [
|
||||
"ie/7..latest",
|
||||
"firefox/16..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/22..latest",
|
||||
"chrome/canary",
|
||||
"opera/12..latest",
|
||||
"opera/next",
|
||||
"safari/5.1..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest"
|
||||
]
|
||||
},
|
||||
"version": "4.0.2"
|
||||
}
|
||||
103
node_modules/gulp-util/node_modules/xtend/test.js
generated
vendored
Normal file
103
node_modules/gulp-util/node_modules/xtend/test.js
generated
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
var test = require("tape")
|
||||
var extend = require("./")
|
||||
var mutableExtend = require("./mutable")
|
||||
|
||||
test("merge", function(assert) {
|
||||
var a = { a: "foo" }
|
||||
var b = { b: "bar" }
|
||||
|
||||
assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("replace", function(assert) {
|
||||
var a = { a: "foo" }
|
||||
var b = { a: "bar" }
|
||||
|
||||
assert.deepEqual(extend(a, b), { a: "bar" })
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("undefined", function(assert) {
|
||||
var a = { a: undefined }
|
||||
var b = { b: "foo" }
|
||||
|
||||
assert.deepEqual(extend(a, b), { a: undefined, b: "foo" })
|
||||
assert.deepEqual(extend(b, a), { a: undefined, b: "foo" })
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("handle 0", function(assert) {
|
||||
var a = { a: "default" }
|
||||
var b = { a: 0 }
|
||||
|
||||
assert.deepEqual(extend(a, b), { a: 0 })
|
||||
assert.deepEqual(extend(b, a), { a: "default" })
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("is immutable", function (assert) {
|
||||
var record = {}
|
||||
|
||||
extend(record, { foo: "bar" })
|
||||
assert.equal(record.foo, undefined)
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("null as argument", function (assert) {
|
||||
var a = { foo: "bar" }
|
||||
var b = null
|
||||
var c = void 0
|
||||
|
||||
assert.deepEqual(extend(b, a, c), { foo: "bar" })
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("mutable", function (assert) {
|
||||
var a = { foo: "bar" }
|
||||
|
||||
mutableExtend(a, { bar: "baz" })
|
||||
|
||||
assert.equal(a.bar, "baz")
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("null prototype", function(assert) {
|
||||
var a = { a: "foo" }
|
||||
var b = Object.create(null)
|
||||
b.b = "bar";
|
||||
|
||||
assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("null prototype mutable", function (assert) {
|
||||
var a = { foo: "bar" }
|
||||
var b = Object.create(null)
|
||||
b.bar = "baz";
|
||||
|
||||
mutableExtend(a, b)
|
||||
|
||||
assert.equal(a.bar, "baz")
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("prototype pollution", function (assert) {
|
||||
var a = {}
|
||||
var maliciousPayload = '{"__proto__":{"oops":"It works!"}}'
|
||||
|
||||
assert.strictEqual(a.oops, undefined)
|
||||
extend({}, maliciousPayload)
|
||||
assert.strictEqual(a.oops, undefined)
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("prototype pollution mutable", function (assert) {
|
||||
var a = {}
|
||||
var maliciousPayload = '{"__proto__":{"oops":"It works!"}}'
|
||||
|
||||
assert.strictEqual(a.oops, undefined)
|
||||
mutableExtend({}, maliciousPayload)
|
||||
assert.strictEqual(a.oops, undefined)
|
||||
assert.end()
|
||||
})
|
||||
96
node_modules/gulp-util/package.json
generated
vendored
Executable file
96
node_modules/gulp-util/package.json
generated
vendored
Executable file
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"gulp-util@3.0.8",
|
||||
"/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome"
|
||||
]
|
||||
],
|
||||
"_from": "gulp-util@3.0.8",
|
||||
"_id": "gulp-util@3.0.8",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=",
|
||||
"_location": "/gulp-util",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "gulp-util@3.0.8",
|
||||
"name": "gulp-util",
|
||||
"escapedName": "gulp-util",
|
||||
"rawSpec": "3.0.8",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "3.0.8"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp",
|
||||
"/gulp-decompress",
|
||||
"/gulp-iconfont-css",
|
||||
"/gulp-svg2ttf",
|
||||
"/gulp-ttf2eot",
|
||||
"/gulp-ttf2woff",
|
||||
"/gulp-ttf2woff2"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz",
|
||||
"_spec": "3.0.8",
|
||||
"_where": "/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome",
|
||||
"author": {
|
||||
"name": "Fractal",
|
||||
"email": "contact@wearefractal.com",
|
||||
"url": "http://wearefractal.com/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/gulpjs/gulp-util/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"array-differ": "^1.0.0",
|
||||
"array-uniq": "^1.0.2",
|
||||
"beeper": "^1.0.0",
|
||||
"chalk": "^1.0.0",
|
||||
"dateformat": "^2.0.0",
|
||||
"fancy-log": "^1.1.0",
|
||||
"gulplog": "^1.0.0",
|
||||
"has-gulplog": "^0.1.0",
|
||||
"lodash._reescape": "^3.0.0",
|
||||
"lodash._reevaluate": "^3.0.0",
|
||||
"lodash._reinterpolate": "^3.0.0",
|
||||
"lodash.template": "^3.0.0",
|
||||
"minimist": "^1.1.0",
|
||||
"multipipe": "^0.1.2",
|
||||
"object-assign": "^3.0.0",
|
||||
"replace-ext": "0.0.1",
|
||||
"through2": "^2.0.0",
|
||||
"vinyl": "^0.5.0"
|
||||
},
|
||||
"description": "Utility functions for gulp plugins",
|
||||
"devDependencies": {
|
||||
"buffer-equal": "^0.0.1",
|
||||
"coveralls": "^2.11.2",
|
||||
"event-stream": "^3.1.7",
|
||||
"istanbul": "^0.3.5",
|
||||
"istanbul-coveralls": "^1.0.1",
|
||||
"jshint": "^2.5.11",
|
||||
"lodash.templatesettings": "^3.0.0",
|
||||
"mocha": "^2.0.1",
|
||||
"rimraf": "^2.2.8",
|
||||
"should": "^7.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"lib"
|
||||
],
|
||||
"homepage": "https://github.com/gulpjs/gulp-util#readme",
|
||||
"license": "MIT",
|
||||
"name": "gulp-util",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/gulpjs/gulp-util.git"
|
||||
},
|
||||
"scripts": {
|
||||
"coveralls": "istanbul cover _mocha --report lcovonly && istanbul-coveralls",
|
||||
"test": "jshint *.js lib/*.js test/*.js && mocha"
|
||||
},
|
||||
"version": "3.0.8"
|
||||
}
|
||||
Reference in New Issue
Block a user