ubdate
This commit is contained in:
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
115
node_modules/gulp-uglify/package.json
generated
vendored
Normal file
115
node_modules/gulp-uglify/package.json
generated
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
{
|
||||
"_from": "gulp-uglify",
|
||||
"_id": "gulp-uglify@3.0.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-gk1dhB74AkV2kzqPMQBLA3jPoIAPd/nlNzP2XMDSG8XZrqnlCiDGAqC+rZOumzFvB5zOphlFh6yr3lgcAb/OOg==",
|
||||
"_location": "/gulp-uglify",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "tag",
|
||||
"registry": true,
|
||||
"raw": "gulp-uglify",
|
||||
"name": "gulp-uglify",
|
||||
"escapedName": "gulp-uglify",
|
||||
"rawSpec": "",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "latest"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#DEV:/",
|
||||
"#USER"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-3.0.2.tgz",
|
||||
"_shasum": "5f5b2e8337f879ca9dec971feb1b82a5a87850b0",
|
||||
"_spec": "gulp-uglify",
|
||||
"_where": "/var/www/html/jason/WeihnachtenMelly",
|
||||
"author": {
|
||||
"name": "Terin Stock",
|
||||
"email": "terinjokes@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/terinjokes/gulp-uglify/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"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"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Minify files with UglifyJS.",
|
||||
"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"
|
||||
},
|
||||
"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/"
|
||||
],
|
||||
"greenkeeper": {
|
||||
"ignore": [
|
||||
"gulp-sourcemaps"
|
||||
]
|
||||
},
|
||||
"homepage": "https://github.com/terinjokes/gulp-uglify/",
|
||||
"keywords": [
|
||||
"gulpplugin"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "gulp-uglify",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/terinjokes/gulp-uglify.git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint *.js lib test",
|
||||
"test": "tape test/*.js"
|
||||
},
|
||||
"version": "3.0.2"
|
||||
}
|
||||
Reference in New Issue
Block a user