initial commit
This commit is contained in:
95
node_modules/gulp-uglify-harmony/CHANGELOG.md
generated
vendored
Normal file
95
node_modules/gulp-uglify-harmony/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-harmony/LICENSE.md
generated
vendored
Normal file
20
node_modules/gulp-uglify-harmony/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-harmony/README.md
generated
vendored
Normal file
94
node_modules/gulp-uglify-harmony/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-harmony/composer.js
generated
vendored
Normal file
19
node_modules/gulp-uglify-harmony/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-harmony/index.js
generated
vendored
Normal file
14
node_modules/gulp-uglify-harmony/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-harmony/lib/create-error.js
generated
vendored
Normal file
12
node_modules/gulp-uglify-harmony/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-harmony/lib/gulp-uglify-error.js
generated
vendored
Normal file
16
node_modules/gulp-uglify-harmony/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-harmony/lib/log.js
generated
vendored
Normal file
15
node_modules/gulp-uglify-harmony/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-harmony/lib/minify.js
generated
vendored
Normal file
79
node_modules/gulp-uglify-harmony/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;
|
||||
};
|
||||
};
|
||||
};
|
||||
22
node_modules/gulp-uglify-harmony/node_modules/glogg/LICENSE
generated
vendored
Normal file
22
node_modules/gulp-uglify-harmony/node_modules/glogg/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014, 2015, 2018 Blaine Bublitz <blaine.bublitz@gmail.com> and Eric Schoffstall <yo@contra.io>
|
||||
|
||||
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.
|
||||
|
||||
114
node_modules/gulp-uglify-harmony/node_modules/glogg/README.md
generated
vendored
Normal file
114
node_modules/gulp-uglify-harmony/node_modules/glogg/README.md
generated
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
<p align="center">
|
||||
<a href="http://gulpjs.com">
|
||||
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
# glogg
|
||||
|
||||
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
|
||||
|
||||
Global logging utility.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var getLogger = require('glogg');
|
||||
|
||||
var logger = getLogger('my-namespace');
|
||||
|
||||
// logs strings
|
||||
logger.debug('The MOST verbose!');
|
||||
logger.info('Some important info');
|
||||
logger.warn('All the warnings to you');
|
||||
logger.error('OH NO! SOMETHING HAPPENED!');
|
||||
|
||||
// supports util.format!
|
||||
logger.info('%s style!', 'printf');
|
||||
|
||||
// log anything
|
||||
logger.debug({ my: 'obj' });
|
||||
logger.info([1, 2, 3]);
|
||||
|
||||
// somewhere else
|
||||
logger.on('info', function(msg){
|
||||
// do something with msg
|
||||
});
|
||||
|
||||
// must be handled to avoid crashing process
|
||||
logger.on('error', function(msg){
|
||||
// now it won't crash
|
||||
});
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
__Note: This module makes no assumptions about the log levels and they will always
|
||||
be emitted. If you are looking to filter some out, your listeners will need to have
|
||||
extra logic.__
|
||||
|
||||
### getLogger([namespace])
|
||||
|
||||
Create a new logger at the given namespace (or the default if no namespace is provided).
|
||||
Returns an augmented [`sparkles`](https://github.com/phated/sparkles) EventEmitter object
|
||||
with 4 methods: `debug()`, `info()`, `warn()` and `error()`. When called, these methods emit
|
||||
an event with the same name. If the first argument is a string, the arguments
|
||||
are passed through node's `util.format()` before being emitted. Other parts
|
||||
of a node program can get the logger by namespace and listen for the events to
|
||||
be emitted.
|
||||
|
||||
#### logger.debug(msg)
|
||||
|
||||
Emits a `debug` event with the given `msg`.
|
||||
|
||||
If the first argument is a string, all arguments are passed to node's
|
||||
`util.format()` before being emitted.
|
||||
|
||||
#### logger.info(msg)
|
||||
|
||||
Emits a `info` event with the given `msg`.
|
||||
|
||||
If the first argument is a string, all arguments are passed to node's
|
||||
`util.format()` before being emitted.
|
||||
|
||||
#### logger.warn(msg)
|
||||
|
||||
Emits a `warn` event with the given `msg`.
|
||||
|
||||
If the first argument is a string, all arguments are passed to node's
|
||||
`util.format()` before being emitted.
|
||||
|
||||
#### logger.error(msg)
|
||||
|
||||
Emits a `error` event with the given `msg`.
|
||||
|
||||
If the first argument is a string, all arguments are passed to node's
|
||||
`util.format()` before being emitted.
|
||||
|
||||
__Note: You must handle this event in some way or the node process will crash
|
||||
when an `error` event is emitted.__
|
||||
|
||||
#### logger.on(event, fn)
|
||||
|
||||
Standard API from node's `EventEmitter`. Use this to listen for events from
|
||||
the logger methods.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[downloads-image]: http://img.shields.io/npm/dm/glogg.svg
|
||||
[npm-url]: https://www.npmjs.com/package/glogg
|
||||
[npm-image]: http://img.shields.io/npm/v/glogg.svg
|
||||
|
||||
[travis-url]: https://travis-ci.org/gulpjs/glogg
|
||||
[travis-image]: http://img.shields.io/travis/gulpjs/glogg.svg?label=travis-ci
|
||||
|
||||
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glogg
|
||||
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glogg.svg?label=appveyor
|
||||
|
||||
[coveralls-url]: https://coveralls.io/r/gulpjs/glogg
|
||||
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/glogg/master.svg
|
||||
|
||||
[gitter-url]: https://gitter.im/gulpjs/gulp
|
||||
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
|
||||
34
node_modules/gulp-uglify-harmony/node_modules/glogg/index.js
generated
vendored
Normal file
34
node_modules/gulp-uglify-harmony/node_modules/glogg/index.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
'use strict';
|
||||
|
||||
var format = require('util').format;
|
||||
|
||||
var sparkles = require('sparkles');
|
||||
|
||||
var levels = [
|
||||
'debug',
|
||||
'info',
|
||||
'warn',
|
||||
'error',
|
||||
];
|
||||
|
||||
function getLogger(namespace) {
|
||||
var logger = sparkles(namespace);
|
||||
|
||||
levels.forEach(function(level) {
|
||||
logger[level] = makeLogLevel(logger, level);
|
||||
});
|
||||
|
||||
return logger;
|
||||
}
|
||||
|
||||
function makeLogLevel(self, level) {
|
||||
return function(msg) {
|
||||
if (typeof msg === 'string') {
|
||||
msg = format.apply(null, arguments);
|
||||
}
|
||||
|
||||
self.emit(level, msg);
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = getLogger;
|
||||
44
node_modules/gulp-uglify-harmony/node_modules/glogg/package.json
generated
vendored
Normal file
44
node_modules/gulp-uglify-harmony/node_modules/glogg/package.json
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "glogg",
|
||||
"version": "1.0.2",
|
||||
"description": "Global logging utility",
|
||||
"author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",
|
||||
"contributors": [
|
||||
"Blaine Bublitz <blaine.bublitz@gmail.com>"
|
||||
],
|
||||
"repository": "gulpjs/glogg",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
},
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"pretest": "npm run lint",
|
||||
"test": "mocha --async-only",
|
||||
"cover": "istanbul cover _mocha --report lcovonly",
|
||||
"coveralls": "npm run cover && istanbul-coveralls"
|
||||
},
|
||||
"dependencies": {
|
||||
"sparkles": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^2.13.0",
|
||||
"eslint-config-gulp": "^3.0.1",
|
||||
"expect": "^1.20.2",
|
||||
"istanbul": "^0.4.3",
|
||||
"istanbul-coveralls": "^1.0.3",
|
||||
"mocha": "^3.5.3"
|
||||
},
|
||||
"keywords": [
|
||||
"global",
|
||||
"log",
|
||||
"logger",
|
||||
"logging",
|
||||
"shared"
|
||||
]
|
||||
}
|
||||
10
node_modules/gulp-uglify-harmony/node_modules/gulplog/CHANGELOG.md
generated
vendored
Normal file
10
node_modules/gulp-uglify-harmony/node_modules/gulplog/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
# gulplog changelog
|
||||
|
||||
## 1.0.0
|
||||
|
||||
- Initial release
|
||||
- No implementation changed since initial commit
|
||||
|
||||
## 0.0.0
|
||||
|
||||
- Experimentation
|
||||
22
node_modules/gulp-uglify-harmony/node_modules/gulplog/LICENSE
generated
vendored
Normal file
22
node_modules/gulp-uglify-harmony/node_modules/gulplog/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Blaine Bublitz, Eric Schoffstall and other 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.
|
||||
|
||||
79
node_modules/gulp-uglify-harmony/node_modules/gulplog/README.md
generated
vendored
Normal file
79
node_modules/gulp-uglify-harmony/node_modules/gulplog/README.md
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
<p align="center">
|
||||
<a href="http://gulpjs.com">
|
||||
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
# gulplog
|
||||
|
||||
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Gitter chat][gitter-image]][gitter-url]
|
||||
|
||||
Logger for gulp and gulp plugins
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var logger = require('gulplog');
|
||||
|
||||
// logs strings
|
||||
logger.debug('The MOST verbose!');
|
||||
logger.info('Some important info');
|
||||
logger.warn('All the warnings to you');
|
||||
logger.error('OH NO! SOMETHING HAPPENED!');
|
||||
|
||||
// supports util.format!
|
||||
logger.info('%s style!', 'printf');
|
||||
|
||||
// log anything
|
||||
logger.debug({ my: 'obj' });
|
||||
logger.info([1, 2, 3]);
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
Logging (and level of logging) is controlled by [`gulp-cli`][gulp-cli-url]
|
||||
|
||||
#### logger.debug(msg)
|
||||
|
||||
Highest log level. Typically used for debugging purposes.
|
||||
|
||||
If the first argument is a string, all arguments are passed to node's
|
||||
[`util.format()`][util-format-url] before being emitted.
|
||||
|
||||
#### logger.info(msg)
|
||||
|
||||
Standard log level. Typically used for user information.
|
||||
|
||||
If the first argument is a string, all arguments are passed to node's
|
||||
[`util.format()`][util-format-url] before being emitted.
|
||||
|
||||
#### logger.warn(msg)
|
||||
|
||||
Warning log level. Typically used for warnings.
|
||||
|
||||
If the first argument is a string, all arguments are passed to node's
|
||||
[`util.format()`][util-format-url] before being emitted.
|
||||
|
||||
#### logger.error(msg)
|
||||
|
||||
Error log level. Typically used when things went horribly wrong.
|
||||
|
||||
If the first argument is a string, all arguments are passed to node's
|
||||
[`util.format()`][util-format-url] before being emitted.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[downloads-image]: http://img.shields.io/npm/dm/gulplog.svg
|
||||
[npm-url]: https://npmjs.org/package/gulplog
|
||||
[npm-image]: http://img.shields.io/npm/v/gulplog.svg
|
||||
|
||||
[travis-url]: https://travis-ci.org/gulpjs/gulplog
|
||||
[travis-image]: http://img.shields.io/travis/gulpjs/gulplog.svg
|
||||
|
||||
[gitter-url]: https://gitter.im/gulpjs/gulp
|
||||
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png
|
||||
|
||||
[gulp-cli-url]: https://github.com/gulpjs/gulp-cli
|
||||
[util-format-url]: https://nodejs.org/docs/latest/api/util.html#util_util_format_format
|
||||
7
node_modules/gulp-uglify-harmony/node_modules/gulplog/index.js
generated
vendored
Normal file
7
node_modules/gulp-uglify-harmony/node_modules/gulplog/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var getLogger = require('glogg');
|
||||
|
||||
var logger = getLogger('gulplog');
|
||||
|
||||
module.exports = logger;
|
||||
34
node_modules/gulp-uglify-harmony/node_modules/gulplog/package.json
generated
vendored
Normal file
34
node_modules/gulp-uglify-harmony/node_modules/gulplog/package.json
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "gulplog",
|
||||
"version": "1.0.0",
|
||||
"description": "Logger for gulp and gulp plugins",
|
||||
"author": "Blaine Bublitz <blaine@iceddev.com> (http://iceddev.com)",
|
||||
"contributors": [],
|
||||
"repository": "gulpjs/gulplog",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
},
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "eslint index.js && jscs index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"glogg": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^1.5.1",
|
||||
"eslint-config-node-style-guide": "^1.0.1",
|
||||
"jscs": "^2.1.1"
|
||||
},
|
||||
"keywords": [
|
||||
"gulp",
|
||||
"gulp-util",
|
||||
"log",
|
||||
"logging"
|
||||
]
|
||||
}
|
||||
22
node_modules/gulp-uglify-harmony/node_modules/sparkles/LICENSE
generated
vendored
Normal file
22
node_modules/gulp-uglify-harmony/node_modules/sparkles/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Blaine Bublitz <blaine.bublitz@gmail.com> and Eric Schoffstall <yo@contra.io>
|
||||
|
||||
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.
|
||||
|
||||
62
node_modules/gulp-uglify-harmony/node_modules/sparkles/README.md
generated
vendored
Normal file
62
node_modules/gulp-uglify-harmony/node_modules/sparkles/README.md
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
<p align="center">
|
||||
<a href="http://gulpjs.com">
|
||||
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
# sparkles
|
||||
|
||||
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
|
||||
|
||||
Namespaced global event emitter
|
||||
|
||||
## Usage
|
||||
|
||||
Sparkles exports a function that returns a singleton `EventEmitter`.
|
||||
This EE can be shared across your application, whether or not node loads
|
||||
multiple copies.
|
||||
|
||||
```js
|
||||
var sparkles = require('sparkles')(); // make sure to call the function
|
||||
|
||||
sparkles.on('my-event', function(evt){
|
||||
console.log('my-event handled', evt);
|
||||
});
|
||||
|
||||
sparkles.emit('my-event', { my: 'event' });
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### sparkles(namespace)
|
||||
|
||||
Returns an EventEmitter that is shared amongst the provided namespace. If no namespace
|
||||
is provided, returns a default EventEmitter.
|
||||
|
||||
### sparkles.exists(namespace);
|
||||
|
||||
Checks whether a namespace exists and returns true or false.
|
||||
|
||||
## Why the name?
|
||||
|
||||
This is a "global emitter"; shortened: "glitter" but it was already taken; so we got sparkles instead :smile:
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[downloads-image]: http://img.shields.io/npm/dm/sparkles.svg
|
||||
[npm-url]: https://www.npmjs.com/package/sparkles
|
||||
[npm-image]: http://img.shields.io/npm/v/sparkles.svg
|
||||
|
||||
[travis-url]: https://travis-ci.org/gulpjs/sparkles
|
||||
[travis-image]: http://img.shields.io/travis/gulpjs/sparkles.svg?label=travis-ci
|
||||
|
||||
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/sparkles
|
||||
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/sparkles.svg?label=appveyor
|
||||
|
||||
[coveralls-url]: https://coveralls.io/r/gulpjs/sparkles
|
||||
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/sparkles/master.svg
|
||||
|
||||
[gitter-url]: https://gitter.im/gulpjs/gulp
|
||||
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
|
||||
45
node_modules/gulp-uglify-harmony/node_modules/sparkles/index.js
generated
vendored
Normal file
45
node_modules/gulp-uglify-harmony/node_modules/sparkles/index.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
'use strict';
|
||||
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
|
||||
var sparklesNamespace = 'store@sparkles';
|
||||
var defaultNamespace = 'default';
|
||||
|
||||
function getStore() {
|
||||
var store = global[sparklesNamespace];
|
||||
|
||||
if (!store) {
|
||||
store = global[sparklesNamespace] = {};
|
||||
}
|
||||
|
||||
return store;
|
||||
}
|
||||
|
||||
function getEmitter(namespace) {
|
||||
|
||||
var store = getStore();
|
||||
|
||||
namespace = namespace || defaultNamespace;
|
||||
|
||||
var ee = store[namespace];
|
||||
|
||||
if (!ee) {
|
||||
ee = store[namespace] = new EventEmitter();
|
||||
ee.setMaxListeners(0);
|
||||
ee.remove = function remove() {
|
||||
ee.removeAllListeners();
|
||||
delete store[namespace];
|
||||
};
|
||||
}
|
||||
|
||||
return ee;
|
||||
}
|
||||
|
||||
function exists(namespace) {
|
||||
var store = getStore();
|
||||
|
||||
return !!(store[namespace]);
|
||||
}
|
||||
|
||||
module.exports = getEmitter;
|
||||
module.exports.exists = exists;
|
||||
42
node_modules/gulp-uglify-harmony/node_modules/sparkles/package.json
generated
vendored
Normal file
42
node_modules/gulp-uglify-harmony/node_modules/sparkles/package.json
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "sparkles",
|
||||
"version": "1.0.1",
|
||||
"description": "Namespaced global event emitter",
|
||||
"author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",
|
||||
"contributors": [
|
||||
"Blaine Bublitz <blaine.bublitz@gmail.com>"
|
||||
],
|
||||
"repository": "gulpjs/sparkles",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
},
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"pretest": "npm run lint",
|
||||
"test": "mocha --async-only",
|
||||
"cover": "istanbul cover _mocha --report lcovonly",
|
||||
"coveralls": "npm run cover && istanbul-coveralls"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"eslint": "^2.13.0",
|
||||
"eslint-config-gulp": "^3.0.1",
|
||||
"expect": "^1.20.2",
|
||||
"istanbul": "^0.4.3",
|
||||
"istanbul-coveralls": "^1.0.3",
|
||||
"mocha": "^3.5.3"
|
||||
},
|
||||
"keywords": [
|
||||
"ee",
|
||||
"emitter",
|
||||
"events",
|
||||
"global",
|
||||
"namespaced"
|
||||
]
|
||||
}
|
||||
81
node_modules/gulp-uglify-harmony/package.json
generated
vendored
Normal file
81
node_modules/gulp-uglify-harmony/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"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user