Add production dependencies
This commit is contained in:
parent
5a0114f3e2
commit
579ccdc29f
12113 changed files with 978046 additions and 3 deletions
95
node_modules/gulp-uglify/CHANGELOG.md
generated
vendored
Normal file
95
node_modules/gulp-uglify/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,95 @@
|
|||
As of version 2.0.0, the CHANGELOG is maintained on [GitHub Releases](https://github.com/terinjokes/gulp-uglify/releases).
|
||||
|
||||
# Change Log
|
||||
|
||||
<a name="1.5.4"></a>
|
||||
## [1.5.4](https://github.com/terinjokes/gulp-uglify/compare/v1.5.3...v1.5.4) (2016-06-22)
|
||||
|
||||
## 1.5.3
|
||||
|
||||
- Updated UglifyJS to 2.6.2
|
||||
|
||||
## 1.5.2
|
||||
|
||||
- Updated UglfiyJS to 2.6.1
|
||||
|
||||
## 1.5.0
|
||||
|
||||
- Update UglifyJS to 2.6.0.
|
||||
- CI and dependencies chores.
|
||||
- Attempt to resolve issue #109 where "ghost" files would appear in generated sourcemaps.
|
||||
|
||||
## 1.4.2
|
||||
|
||||
- Updated UglifyJS to 2.5.0.
|
||||
- CI and dependencies chores.
|
||||
|
||||
## 1.4.1
|
||||
|
||||
- Detect if options is a non-Object and log a warning.
|
||||
|
||||
Older versions of Node.js did not allow Strings to be passed to `Object.keys` leading to errors and confusion to users following certain tutorials.
|
||||
|
||||
## 1.4.0
|
||||
|
||||
- Deprecated the `preserveComments` option of "some".
|
||||
- Added the `preserveComments` option of "license" that uses [`uglify-save-license`](https://github.com/shinnn/uglify-save-license).
|
||||
|
||||
## 1.3.0
|
||||
|
||||
- Updated UglifyJS to 2.4.24.
|
||||
- Streams3 support via through2 dependency update.
|
||||
|
||||
## 1.2.0
|
||||
|
||||
- Update dependencies, including UglifyJS to 2.4.19.
|
||||
|
||||
## 1.1.0
|
||||
|
||||
- Fix sources path in source maps (thanks @floridoo)
|
||||
- Update UglifyJS to 2.4.16 (thanks @tschaub)
|
||||
|
||||
## 1.0.0
|
||||
|
||||
- Handle cases where UglifyJS uses e.msg instead of e.message for error codes. Fixes #51.
|
||||
- Supplement UglifyJS’s source map merging with vinyl-sourcemap-apply to correct issues where `sources` and `sourcesContent` were different. Fixes #43.
|
||||
- Refactor option parsing and defaults, and calls to uglify-js, to reduce complexity of the main function.
|
||||
- Added tests for the previously forgotten `preserveComments` option.
|
||||
- Updated UglifyJS to 2.4.15.
|
||||
- Changed dependencies to explicit ranges to avoid `node-semver` issues.
|
||||
|
||||
## 0.3.2
|
||||
|
||||
- Removed the PluginError factory wrapper
|
||||
- Removed test that was failing due to gulp-util issue.
|
||||
- Tests should end the streams they are writing to.
|
||||
- Update dependencies. Fixes #44. Fixes #42.
|
||||
|
||||
## 0.3.1
|
||||
|
||||
- Fixed homepage URL in npm metadata
|
||||
- Removes UglifyJS-inserted sourceMappingURL comment [Fixes #39]
|
||||
- Don’t pass input source map to UglifyJS if there are no mappings
|
||||
- Added installation instructions
|
||||
|
||||
## 0.3.0
|
||||
|
||||
- Removed support for old style source maps
|
||||
- Added support for gulp-sourcemap
|
||||
- Updated tape development dependency
|
||||
- Dropped support for Node 0.9
|
||||
- UglifyJS errors are no longer swallowed
|
||||
|
||||
## 0.2.1
|
||||
|
||||
- Correct source map output
|
||||
- Remove `gulp` dependency by using `vinyl` in testing
|
||||
- Passthrough null files correctly
|
||||
- Report error if attempting to use a stream-backed file
|
||||
|
||||
## 0.2.0
|
||||
|
||||
- Dropped support for Node versions less than 0.9
|
||||
- Switched to using Streams2
|
||||
- Add support for generating source maps
|
||||
- Add option for preserving comments
|
20
node_modules/gulp-uglify/LICENSE.md
generated
vendored
Normal file
20
node_modules/gulp-uglify/LICENSE.md
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
Copyright (c) 2013-2017 Terin Stock <terinjokes@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
94
node_modules/gulp-uglify/README.md
generated
vendored
Normal file
94
node_modules/gulp-uglify/README.md
generated
vendored
Normal file
|
@ -0,0 +1,94 @@
|
|||
# gulp-uglify [![][travis-shield-img]][travis-shield][![][appveyor-shield-img]][appveyor-shield][![][npm-dl-shield-img]][npm-shield][![][npm-v-shield-img]][npm-shield][![][coveralls-shield-img]][coveralls-shield]
|
||||
|
||||
> Minify JavaScript with UglifyJS3.
|
||||
|
||||
## Installation
|
||||
|
||||
Install package with NPM and add it to your development dependencies:
|
||||
|
||||
`npm install --save-dev gulp-uglify`
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
var gulp = require('gulp');
|
||||
var uglify = require('gulp-uglify');
|
||||
var pipeline = require('readable-stream').pipeline;
|
||||
|
||||
gulp.task('compress', function () {
|
||||
return pipeline(
|
||||
gulp.src('lib/*.js'),
|
||||
uglify(),
|
||||
gulp.dest('dist')
|
||||
);
|
||||
});
|
||||
```
|
||||
|
||||
To help properly handle error conditions with Node streams, this project
|
||||
recommends the use of
|
||||
[`pipeline`](https://nodejs.org/docs/latest/api/stream.html#stream_stream_pipeline_streams_callback),
|
||||
from [`readable-stream`](https://github.com/nodejs/readable-stream).
|
||||
|
||||
## Options
|
||||
|
||||
Most of the [minify options](https://github.com/mishoo/UglifyJS2#minify-options) from
|
||||
the UglifyJS API are supported. There are a few exceptions:
|
||||
|
||||
1. The `sourceMap` option must not be set, as it will be automatically configured
|
||||
based on your Gulp configuration. See the documentation for [Gulp sourcemaps][gulp-sm].
|
||||
|
||||
[gulp-sm]: https://github.com/gulp-sourcemaps/gulp-sourcemaps#usage
|
||||
|
||||
## Errors
|
||||
|
||||
`gulp-uglify` emits an 'error' event if it is unable to minify a specific file.
|
||||
The GulpUglifyError constructor is exported by this plugin for `instanceof` checks.
|
||||
It contains the following properties:
|
||||
|
||||
- `fileName`: The full file path for the file being minified.
|
||||
- `cause`: The original UglifyJS error, if available.
|
||||
|
||||
Most UglifyJS error messages have the following properties:
|
||||
|
||||
- `message` (or `msg`)
|
||||
- `filename`
|
||||
- `line`
|
||||
|
||||
To see useful error messages, see [Why Use Pipeline?](docs/why-use-pipeline/README.md#why-use-pipeline).
|
||||
|
||||
## Using a Different UglifyJS
|
||||
|
||||
By default, `gulp-uglify` uses the version of UglifyJS installed as a dependency.
|
||||
It's possible to configure the use of a different version using the "composer" entry point.
|
||||
|
||||
```javascript
|
||||
var uglifyjs = require('uglify-js'); // can be a git checkout
|
||||
// or another module (such as `uglify-es` for ES6 support)
|
||||
var composer = require('gulp-uglify/composer');
|
||||
var pump = require('pump');
|
||||
|
||||
var minify = composer(uglifyjs, console);
|
||||
|
||||
gulp.task('compress', function (cb) {
|
||||
// the same options as described above
|
||||
var options = {};
|
||||
|
||||
pump([
|
||||
gulp.src('lib/*.js'),
|
||||
minify(options),
|
||||
gulp.dest('dist')
|
||||
],
|
||||
cb
|
||||
);
|
||||
});
|
||||
```
|
||||
|
||||
[travis-shield-img]: https://img.shields.io/travis/terinjokes/gulp-uglify/master.svg?label=Travis%20CI&style=flat-square
|
||||
[travis-shield]: https://travis-ci.org/terinjokes/gulp-uglify
|
||||
[appveyor-shield-img]: https://img.shields.io/appveyor/ci/terinjokes/gulp-uglify/master.svg?label=AppVeyor&style=flat-square
|
||||
[appveyor-shield]: https://ci.appveyor.com/project/terinjokes/gulp-uglify
|
||||
[npm-dl-shield-img]: https://img.shields.io/npm/dm/gulp-uglify.svg?style=flat-square
|
||||
[npm-shield]: https://yarnpkg.com/en/package/gulp-uglify
|
||||
[npm-v-shield-img]: https://img.shields.io/npm/v/gulp-uglify.svg?style=flat-square
|
||||
[coveralls-shield-img]: https://img.shields.io/coveralls/terinjokes/gulp-uglify/master.svg?style=flat-square
|
||||
[coveralls-shield]: https://coveralls.io/github/terinjokes/gulp-uglify
|
19
node_modules/gulp-uglify/composer.js
generated
vendored
Normal file
19
node_modules/gulp-uglify/composer.js
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
'use strict';
|
||||
var through = require('through2');
|
||||
var minify = require('./lib/minify');
|
||||
|
||||
module.exports = function(uglify, logger) {
|
||||
return function(opts) {
|
||||
var minifier = minify(uglify, logger)(opts);
|
||||
return through.obj(function(file, encoding, callback) {
|
||||
var newFile = null;
|
||||
var err = null;
|
||||
try {
|
||||
newFile = minifier(file);
|
||||
} catch (e) {
|
||||
err = e;
|
||||
}
|
||||
callback(err, newFile);
|
||||
});
|
||||
};
|
||||
};
|
14
node_modules/gulp-uglify/index.js
generated
vendored
Normal file
14
node_modules/gulp-uglify/index.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
'use strict';
|
||||
var uglify = require('uglify-js');
|
||||
var compose = require('./composer');
|
||||
var GulpUglifyError = require('./lib/gulp-uglify-error');
|
||||
var logger = require('./lib/log');
|
||||
|
||||
module.exports = function(opts) {
|
||||
return compose(
|
||||
uglify,
|
||||
logger
|
||||
)(opts);
|
||||
};
|
||||
|
||||
module.exports.GulpUglifyError = GulpUglifyError;
|
12
node_modules/gulp-uglify/lib/create-error.js
generated
vendored
Normal file
12
node_modules/gulp-uglify/lib/create-error.js
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
'use strict';
|
||||
var GulpUglifyError = require('./gulp-uglify-error');
|
||||
|
||||
function createError(file, msg, cause) {
|
||||
var perr = new GulpUglifyError(msg, cause);
|
||||
perr.plugin = 'gulp-uglify';
|
||||
perr.fileName = file.path;
|
||||
perr.showStack = false;
|
||||
return perr;
|
||||
}
|
||||
|
||||
module.exports = createError;
|
16
node_modules/gulp-uglify/lib/gulp-uglify-error.js
generated
vendored
Normal file
16
node_modules/gulp-uglify/lib/gulp-uglify-error.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
'use strict';
|
||||
var makeErrorCause = require('make-error-cause');
|
||||
|
||||
var gulpUglifyError = makeErrorCause('GulpUglifyError');
|
||||
gulpUglifyError.prototype.toString = function() {
|
||||
var cause = this.cause || {};
|
||||
|
||||
return (
|
||||
makeErrorCause.BaseError.prototype.toString.call(this) +
|
||||
(this.fileName ? '\nFile: ' + this.fileName : '') +
|
||||
(cause.line ? '\nLine: ' + cause.line : '') +
|
||||
(cause.col ? '\nCol: ' + cause.col : '')
|
||||
);
|
||||
};
|
||||
|
||||
module.exports = gulpUglifyError;
|
15
node_modules/gulp-uglify/lib/log.js
generated
vendored
Normal file
15
node_modules/gulp-uglify/lib/log.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
'use strict';
|
||||
var hasLog = require('has-gulplog');
|
||||
var each = require('array-each');
|
||||
|
||||
var levels = ['debug', 'info', 'warn', 'error'];
|
||||
|
||||
each(levels, function(level) {
|
||||
module.exports[level] = function() {
|
||||
if (hasLog()) {
|
||||
var log = require('gulplog');
|
||||
|
||||
log[level].apply(log, arguments);
|
||||
}
|
||||
};
|
||||
});
|
79
node_modules/gulp-uglify/lib/minify.js
generated
vendored
Normal file
79
node_modules/gulp-uglify/lib/minify.js
generated
vendored
Normal file
|
@ -0,0 +1,79 @@
|
|||
'use strict';
|
||||
var Buffer = require('safe-buffer').Buffer;
|
||||
var applySourceMap = require('vinyl-sourcemaps-apply');
|
||||
var isObject = require('isobject');
|
||||
var extend = require('extend-shallow');
|
||||
var createError = require('./create-error');
|
||||
|
||||
module.exports = function(uglify, log) {
|
||||
function setup(opts) {
|
||||
if (opts && !isObject(opts)) {
|
||||
log.warn('gulp-uglify expects an object, non-object provided');
|
||||
opts = {};
|
||||
}
|
||||
|
||||
return extend(
|
||||
{},
|
||||
{
|
||||
output: {}
|
||||
},
|
||||
opts
|
||||
);
|
||||
}
|
||||
|
||||
return function(opts) {
|
||||
return function(file) {
|
||||
var options = setup(opts || {});
|
||||
var hasSourceMaps = Boolean(file.sourceMap);
|
||||
|
||||
if (file.isNull()) {
|
||||
return file;
|
||||
}
|
||||
|
||||
if (file.isStream()) {
|
||||
throw createError(file, 'Streaming not supported', null);
|
||||
}
|
||||
|
||||
if (hasSourceMaps) {
|
||||
options.sourceMap = {
|
||||
filename: file.sourceMap.file,
|
||||
includeSources: true
|
||||
};
|
||||
|
||||
// UglifyJS generates broken source maps if the input source map
|
||||
// does not contain mappings.
|
||||
if (file.sourceMap.mappings) {
|
||||
options.sourceMap.content = file.sourceMap;
|
||||
}
|
||||
}
|
||||
|
||||
var fileMap = {};
|
||||
fileMap[file.relative] = String(file.contents);
|
||||
|
||||
var mangled = uglify.minify(fileMap, options);
|
||||
|
||||
if (!mangled || mangled.error) {
|
||||
throw createError(
|
||||
file,
|
||||
'unable to minify JavaScript',
|
||||
mangled && mangled.error
|
||||
);
|
||||
}
|
||||
|
||||
if (mangled.warnings) {
|
||||
mangled.warnings.forEach(function(warning) {
|
||||
log.warn('gulp-uglify [%s]: %s', file.relative, warning);
|
||||
});
|
||||
}
|
||||
|
||||
file.contents = Buffer.from(mangled.code);
|
||||
|
||||
if (hasSourceMaps) {
|
||||
var sourceMap = JSON.parse(mangled.map);
|
||||
applySourceMap(file, sourceMap);
|
||||
}
|
||||
|
||||
return file;
|
||||
};
|
||||
};
|
||||
};
|
21
node_modules/gulp-uglify/node_modules/extend-shallow/LICENSE
generated
vendored
Normal file
21
node_modules/gulp-uglify/node_modules/extend-shallow/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2015, 2017, Jon Schlinkert.
|
||||
|
||||
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.
|
97
node_modules/gulp-uglify/node_modules/extend-shallow/README.md
generated
vendored
Normal file
97
node_modules/gulp-uglify/node_modules/extend-shallow/README.md
generated
vendored
Normal file
|
@ -0,0 +1,97 @@
|
|||
# extend-shallow [](https://www.npmjs.com/package/extend-shallow) [](https://npmjs.org/package/extend-shallow) [](https://npmjs.org/package/extend-shallow) [](https://travis-ci.org/jonschlinkert/extend-shallow)
|
||||
|
||||
> Extend an object with the properties of additional objects. node.js/javascript util.
|
||||
|
||||
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save extend-shallow
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var extend = require('extend-shallow');
|
||||
|
||||
extend({a: 'b'}, {c: 'd'})
|
||||
//=> {a: 'b', c: 'd'}
|
||||
```
|
||||
|
||||
Pass an empty object to shallow clone:
|
||||
|
||||
```js
|
||||
var obj = {};
|
||||
extend(obj, {a: 'b'}, {c: 'd'})
|
||||
//=> {a: 'b', c: 'd'}
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
<details>
|
||||
<summary><strong>Contributing</strong></summary>
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Running Tests</strong></summary>
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Building docs</strong></summary>
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Related projects
|
||||
|
||||
You might also be interested in these projects:
|
||||
|
||||
* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.")
|
||||
* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js")
|
||||
* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.")
|
||||
* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.")
|
||||
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
|
||||
* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.")
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 33 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 1 | [pdehaan](https://github.com/pdehaan) |
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._
|
60
node_modules/gulp-uglify/node_modules/extend-shallow/index.js
generated
vendored
Normal file
60
node_modules/gulp-uglify/node_modules/extend-shallow/index.js
generated
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
'use strict';
|
||||
|
||||
var isExtendable = require('is-extendable');
|
||||
var assignSymbols = require('assign-symbols');
|
||||
|
||||
module.exports = Object.assign || function(obj/*, objects*/) {
|
||||
if (obj === null || typeof obj === 'undefined') {
|
||||
throw new TypeError('Cannot convert undefined or null to object');
|
||||
}
|
||||
if (!isObject(obj)) {
|
||||
obj = {};
|
||||
}
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var val = arguments[i];
|
||||
if (isString(val)) {
|
||||
val = toObject(val);
|
||||
}
|
||||
if (isObject(val)) {
|
||||
assign(obj, val);
|
||||
assignSymbols(obj, val);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
|
||||
function assign(a, b) {
|
||||
for (var key in b) {
|
||||
if (hasOwn(b, key)) {
|
||||
a[key] = b[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function isString(val) {
|
||||
return (val && typeof val === 'string');
|
||||
}
|
||||
|
||||
function toObject(str) {
|
||||
var obj = {};
|
||||
for (var i in str) {
|
||||
obj[i] = str[i];
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
function isObject(val) {
|
||||
return (val && typeof val === 'object') || isExtendable(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given `key` is an own property of `obj`.
|
||||
*/
|
||||
|
||||
function hasOwn(obj, key) {
|
||||
return Object.prototype.hasOwnProperty.call(obj, key);
|
||||
}
|
||||
|
||||
function isEnum(obj, key) {
|
||||
return Object.prototype.propertyIsEnumerable.call(obj, key);
|
||||
}
|
83
node_modules/gulp-uglify/node_modules/extend-shallow/package.json
generated
vendored
Normal file
83
node_modules/gulp-uglify/node_modules/extend-shallow/package.json
generated
vendored
Normal file
|
@ -0,0 +1,83 @@
|
|||
{
|
||||
"name": "extend-shallow",
|
||||
"description": "Extend an object with the properties of additional objects. node.js/javascript util.",
|
||||
"version": "3.0.2",
|
||||
"homepage": "https://github.com/jonschlinkert/extend-shallow",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
|
||||
"Peter deHaan (http://about.me/peterdehaan)"
|
||||
],
|
||||
"repository": "jonschlinkert/extend-shallow",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/extend-shallow/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"assign-symbols": "^1.0.0",
|
||||
"is-extendable": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"array-slice": "^1.0.0",
|
||||
"benchmarked": "^2.0.0",
|
||||
"for-own": "^1.0.0",
|
||||
"gulp-format-md": "^1.0.0",
|
||||
"is-plain-object": "^2.0.4",
|
||||
"kind-of": "^6.0.1",
|
||||
"minimist": "^1.2.0",
|
||||
"mocha": "^3.5.3",
|
||||
"object-assign": "^4.1.1"
|
||||
},
|
||||
"keywords": [
|
||||
"assign",
|
||||
"clone",
|
||||
"extend",
|
||||
"merge",
|
||||
"obj",
|
||||
"object",
|
||||
"object-assign",
|
||||
"object.assign",
|
||||
"prop",
|
||||
"properties",
|
||||
"property",
|
||||
"props",
|
||||
"shallow",
|
||||
"util",
|
||||
"utility",
|
||||
"utils",
|
||||
"value"
|
||||
],
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"extend-shallow",
|
||||
"for-in",
|
||||
"for-own",
|
||||
"is-plain-object",
|
||||
"isobject",
|
||||
"kind-of"
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
21
node_modules/gulp-uglify/node_modules/is-extendable/LICENSE
generated
vendored
Normal file
21
node_modules/gulp-uglify/node_modules/is-extendable/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-2017, Jon Schlinkert.
|
||||
|
||||
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.
|
88
node_modules/gulp-uglify/node_modules/is-extendable/README.md
generated
vendored
Normal file
88
node_modules/gulp-uglify/node_modules/is-extendable/README.md
generated
vendored
Normal file
|
@ -0,0 +1,88 @@
|
|||
# is-extendable [](https://www.npmjs.com/package/is-extendable) [](https://npmjs.org/package/is-extendable) [](https://npmjs.org/package/is-extendable) [](https://travis-ci.org/jonschlinkert/is-extendable)
|
||||
|
||||
> Returns true if a value is a plain object, array or function.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save is-extendable
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var isExtendable = require('is-extendable');
|
||||
```
|
||||
|
||||
Returns true if the value is any of the following:
|
||||
|
||||
* array
|
||||
* plain object
|
||||
* function
|
||||
|
||||
## Notes
|
||||
|
||||
All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and:
|
||||
|
||||
* the value is not a primitive, or
|
||||
* that the object is a plain object, function or array
|
||||
|
||||
Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`.
|
||||
|
||||
## Release history
|
||||
|
||||
### v1.0.0 - 2017/07/20
|
||||
|
||||
**Breaking changes**
|
||||
|
||||
* No longer considers date, regex or error objects to be extendable
|
||||
|
||||
## About
|
||||
|
||||
### Related projects
|
||||
|
||||
* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.")
|
||||
* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.")
|
||||
* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.")
|
||||
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
|
||||
* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.")
|
||||
|
||||
### Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
### Building docs
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
### Running tests
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._
|
5
node_modules/gulp-uglify/node_modules/is-extendable/index.d.ts
generated
vendored
Normal file
5
node_modules/gulp-uglify/node_modules/is-extendable/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
export = isExtendable;
|
||||
|
||||
declare function isExtendable(val: any): boolean;
|
||||
|
||||
declare namespace isExtendable {}
|
14
node_modules/gulp-uglify/node_modules/is-extendable/index.js
generated
vendored
Normal file
14
node_modules/gulp-uglify/node_modules/is-extendable/index.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/*!
|
||||
* is-extendable <https://github.com/jonschlinkert/is-extendable>
|
||||
*
|
||||
* Copyright (c) 2015-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var isPlainObject = require('is-plain-object');
|
||||
|
||||
module.exports = function isExtendable(val) {
|
||||
return isPlainObject(val) || typeof val === 'function' || Array.isArray(val);
|
||||
};
|
67
node_modules/gulp-uglify/node_modules/is-extendable/package.json
generated
vendored
Normal file
67
node_modules/gulp-uglify/node_modules/is-extendable/package.json
generated
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"name": "is-extendable",
|
||||
"description": "Returns true if a value is a plain object, array or function.",
|
||||
"version": "1.0.1",
|
||||
"homepage": "https://github.com/jonschlinkert/is-extendable",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"repository": "jonschlinkert/is-extendable",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/is-extendable/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-plain-object": "^2.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^1.0.0",
|
||||
"mocha": "^3.4.2"
|
||||
},
|
||||
"keywords": [
|
||||
"array",
|
||||
"assign",
|
||||
"check",
|
||||
"date",
|
||||
"extend",
|
||||
"extendable",
|
||||
"extensible",
|
||||
"function",
|
||||
"is",
|
||||
"object",
|
||||
"regex",
|
||||
"test"
|
||||
],
|
||||
"verb": {
|
||||
"related": {
|
||||
"list": [
|
||||
"assign-deep",
|
||||
"is-equal-shallow",
|
||||
"is-plain-object",
|
||||
"isobject",
|
||||
"kind-of"
|
||||
]
|
||||
},
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
21
node_modules/gulp-uglify/node_modules/is-plain-object/LICENSE
generated
vendored
Normal file
21
node_modules/gulp-uglify/node_modules/is-plain-object/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
|
||||
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.
|
104
node_modules/gulp-uglify/node_modules/is-plain-object/README.md
generated
vendored
Normal file
104
node_modules/gulp-uglify/node_modules/is-plain-object/README.md
generated
vendored
Normal file
|
@ -0,0 +1,104 @@
|
|||
# is-plain-object [](https://www.npmjs.com/package/is-plain-object) [](https://npmjs.org/package/is-plain-object) [](https://npmjs.org/package/is-plain-object) [](https://travis-ci.org/jonschlinkert/is-plain-object)
|
||||
|
||||
> Returns true if an object was created by the `Object` constructor.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save is-plain-object
|
||||
```
|
||||
|
||||
Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var isPlainObject = require('is-plain-object');
|
||||
```
|
||||
|
||||
**true** when created by the `Object` constructor.
|
||||
|
||||
```js
|
||||
isPlainObject(Object.create({}));
|
||||
//=> true
|
||||
isPlainObject(Object.create(Object.prototype));
|
||||
//=> true
|
||||
isPlainObject({foo: 'bar'});
|
||||
//=> true
|
||||
isPlainObject({});
|
||||
//=> true
|
||||
```
|
||||
|
||||
**false** when not created by the `Object` constructor.
|
||||
|
||||
```js
|
||||
isPlainObject(1);
|
||||
//=> false
|
||||
isPlainObject(['foo', 'bar']);
|
||||
//=> false
|
||||
isPlainObject([]);
|
||||
//=> false
|
||||
isPlainObject(new Foo);
|
||||
//=> false
|
||||
isPlainObject(null);
|
||||
//=> false
|
||||
isPlainObject(Object.create(null));
|
||||
//=> false
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
### Related projects
|
||||
|
||||
* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.")
|
||||
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
|
||||
* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.")
|
||||
|
||||
### Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 17 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 6 | [stevenvachon](https://github.com/stevenvachon) |
|
||||
| 3 | [onokumus](https://github.com/onokumus) |
|
||||
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
|
||||
|
||||
### Building docs
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
### Running tests
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 11, 2017._
|
5
node_modules/gulp-uglify/node_modules/is-plain-object/index.d.ts
generated
vendored
Normal file
5
node_modules/gulp-uglify/node_modules/is-plain-object/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
export = isPlainObject;
|
||||
|
||||
declare function isPlainObject(o: any): boolean;
|
||||
|
||||
declare namespace isPlainObject {}
|
37
node_modules/gulp-uglify/node_modules/is-plain-object/index.js
generated
vendored
Normal file
37
node_modules/gulp-uglify/node_modules/is-plain-object/index.js
generated
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*!
|
||||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var isObject = require('isobject');
|
||||
|
||||
function isObjectObject(o) {
|
||||
return isObject(o) === true
|
||||
&& Object.prototype.toString.call(o) === '[object Object]';
|
||||
}
|
||||
|
||||
module.exports = function isPlainObject(o) {
|
||||
var ctor,prot;
|
||||
|
||||
if (isObjectObject(o) === false) return false;
|
||||
|
||||
// If has modified constructor
|
||||
ctor = o.constructor;
|
||||
if (typeof ctor !== 'function') return false;
|
||||
|
||||
// If has modified prototype
|
||||
prot = ctor.prototype;
|
||||
if (isObjectObject(prot) === false) return false;
|
||||
|
||||
// If constructor does not have an Object-specific method
|
||||
if (prot.hasOwnProperty('isPrototypeOf') === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Most likely a plain Object
|
||||
return true;
|
||||
};
|
79
node_modules/gulp-uglify/node_modules/is-plain-object/package.json
generated
vendored
Normal file
79
node_modules/gulp-uglify/node_modules/is-plain-object/package.json
generated
vendored
Normal file
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
"name": "is-plain-object",
|
||||
"description": "Returns true if an object was created by the `Object` constructor.",
|
||||
"version": "2.0.4",
|
||||
"homepage": "https://github.com/jonschlinkert/is-plain-object",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
|
||||
"Osman Nuri Okumuş (http://onokumus.com)",
|
||||
"Steven Vachon (https://svachon.com)",
|
||||
"(https://github.com/wtgtybhertgeghgtwtg)"
|
||||
],
|
||||
"repository": "jonschlinkert/is-plain-object",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/is-plain-object/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"browserify": "browserify index.js --standalone isPlainObject | uglifyjs --compress --mangle -o browser/is-plain-object.js",
|
||||
"test_browser": "mocha-phantomjs test/browser.html",
|
||||
"test_node": "mocha",
|
||||
"test": "npm run test_node && npm run browserify && npm run test_browser"
|
||||
},
|
||||
"dependencies": {
|
||||
"isobject": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browserify": "^14.4.0",
|
||||
"chai": "^4.0.2",
|
||||
"gulp-format-md": "^1.0.0",
|
||||
"mocha": "^3.4.2",
|
||||
"mocha-phantomjs": "^4.1.0",
|
||||
"phantomjs": "^2.1.7",
|
||||
"uglify-js": "^3.0.24"
|
||||
},
|
||||
"keywords": [
|
||||
"check",
|
||||
"is",
|
||||
"is-object",
|
||||
"isobject",
|
||||
"javascript",
|
||||
"kind",
|
||||
"kind-of",
|
||||
"object",
|
||||
"plain",
|
||||
"type",
|
||||
"typeof",
|
||||
"value"
|
||||
],
|
||||
"types": "index.d.ts",
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"is-number",
|
||||
"isobject",
|
||||
"kind-of"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
9
node_modules/gulp-uglify/node_modules/through2/LICENSE.md
generated
vendored
Normal file
9
node_modules/gulp-uglify/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-uglify/node_modules/through2/README.md
generated
vendored
Normal file
134
node_modules/gulp-uglify/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.
|
33
node_modules/gulp-uglify/node_modules/through2/package.json
generated
vendored
Normal file
33
node_modules/gulp-uglify/node_modules/through2/package.json
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"name": "through2",
|
||||
"version": "2.0.5",
|
||||
"description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise",
|
||||
"main": "through2.js",
|
||||
"scripts": {
|
||||
"test": "node test/test.js | faucet"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/rvagg/through2.git"
|
||||
},
|
||||
"keywords": [
|
||||
"stream",
|
||||
"streams2",
|
||||
"through",
|
||||
"transform"
|
||||
],
|
||||
"author": "Rod Vagg <r@va.gg> (https://github.com/rvagg)",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"readable-stream": "~2.3.6",
|
||||
"xtend": "~4.0.1"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
96
node_modules/gulp-uglify/node_modules/through2/through2.js
generated
vendored
Normal file
96
node_modules/gulp-uglify/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
|
||||
})
|
81
node_modules/gulp-uglify/package.json
generated
vendored
Normal file
81
node_modules/gulp-uglify/package.json
generated
vendored
Normal file
|
@ -0,0 +1,81 @@
|
|||
{
|
||||
"name": "gulp-uglify",
|
||||
"description": "Minify files with UglifyJS.",
|
||||
"version": "3.0.2",
|
||||
"author": "Terin Stock <terinjokes@gmail.com>",
|
||||
"bugs": "https://github.com/terinjokes/gulp-uglify/issues",
|
||||
"dependencies": {
|
||||
"array-each": "^1.0.1",
|
||||
"extend-shallow": "^3.0.2",
|
||||
"gulplog": "^1.0.0",
|
||||
"has-gulplog": "^0.1.0",
|
||||
"isobject": "^3.0.1",
|
||||
"make-error-cause": "^1.1.1",
|
||||
"safe-buffer": "^5.1.2",
|
||||
"through2": "^2.0.0",
|
||||
"uglify-js": "^3.0.5",
|
||||
"vinyl-sourcemaps-apply": "^0.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^3.18.0",
|
||||
"eslint-config-prettier": "^2.1.0",
|
||||
"eslint-config-xo": "^0.18.1",
|
||||
"eslint-plugin-no-use-extend-native": "^0.3.12",
|
||||
"eslint-plugin-prettier": "^2.0.1",
|
||||
"eslint-plugin-unicorn": "^2.1.0",
|
||||
"power-assert": "^1.4.1",
|
||||
"prettier": "^1.1.0",
|
||||
"source-list-map": "^1.1.2",
|
||||
"tape": "^4.9.1",
|
||||
"tape-catch": "^1.0.6",
|
||||
"testdouble": "^2.1.2",
|
||||
"vinyl": "^2.0.0"
|
||||
},
|
||||
"homepage": "https://github.com/terinjokes/gulp-uglify/",
|
||||
"keywords": [
|
||||
"gulpplugin"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"repository": "terinjokes/gulp-uglify",
|
||||
"eslintConfig": {
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"xo",
|
||||
"prettier"
|
||||
],
|
||||
"plugins": [
|
||||
"unicorn",
|
||||
"no-use-extend-native",
|
||||
"prettier"
|
||||
],
|
||||
"rules": {
|
||||
"prettier/prettier": [
|
||||
"error",
|
||||
{
|
||||
"printWidth": 80,
|
||||
"tabWidth": 2,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none",
|
||||
"bracketSpacing": false
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"composer.js",
|
||||
"lib/"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "eslint *.js lib test",
|
||||
"test": "tape test/*.js"
|
||||
},
|
||||
"greenkeeper": {
|
||||
"ignore": [
|
||||
"gulp-sourcemaps"
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue