Socket
Socket
Sign inDemoInstall

gulp-uglify

Package Overview
Dependencies
78
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.3 to 1.5.4

lib/create-error.js

9

CHANGELOG.md

@@ -0,1 +1,10 @@

# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
<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)
# gulp-uglify changelog

@@ -2,0 +11,0 @@

6

minifier.js

@@ -9,3 +9,3 @@ 'use strict';

var isObject = require('isobject');
var createError = require('./lib/createError');
var createError = require('./lib/create-error');

@@ -17,4 +17,4 @@ var reSourceMapComment = /\n\/\/# sourceMappingURL=.+?$/;

return fn();
} catch (e) {
return handle(e);
} catch (err) {
return handle(err);
}

@@ -21,0 +21,0 @@ }

{
"name": "gulp-uglify",
"description": "Minify files with UglifyJS.",
"version": "1.5.3",
"version": "1.5.4",
"author": "Terin Stock <terinjokes@gmail.com>",

@@ -13,3 +13,3 @@ "bugs": "https://github.com/terinjokes/gulp-uglify/issues",

"through2": "^2.0.0",
"uglify-js": "2.6.2",
"uglify-js": "2.6.4",
"uglify-save-license": "^0.4.1",

@@ -26,3 +26,3 @@ "vinyl-sourcemaps-apply": "^0.2.0"

"vinyl": "^1.0.0",
"xo": "^0.12.0"
"xo": "^0.16.0"
},

@@ -29,0 +29,0 @@ "homepage": "https://github.com/terinjokes/gulp-uglify/",

@@ -1,2 +0,2 @@

# gulp-uglify [![Travis-CI Status](https://img.shields.io/travis/terinjokes/gulp-uglify/master.svg?label=Travis CI)](https://travis-ci.org/terinjokes/gulp-uglify) [![AppVeyor Status](https://img.shields.io/appveyor/ci/terinjokes/gulp-uglify/master.svg?label=AppVeyor)](https://ci.appveyor.com/project/terinjokes/gulp-uglify) [![](https://img.shields.io/npm/dm/gulp-uglify.svg)](https://www.npmjs.org/package/gulp-uglify) [![](https://img.shields.io/npm/v/gulp-uglify.svg)](https://www.npmjs.org/package/gulp-uglify) [![](https://img.shields.io/coveralls/terinjokes/gulp-uglify/master.svg)](https://coveralls.io/github/terinjokes/gulp-uglify)
# 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]

@@ -14,11 +14,21 @@ > Minify JavaScript with UglifyJS2.

```javascript
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var pump = require('pump');
gulp.task('compress', function() {
return gulp.src('lib/*.js')
.pipe(uglify())
.pipe(gulp.dest('dist'));
gulp.task('compress', function (cb) {
pump([
gulp.src('lib/*.js'),
uglify(),
gulp.dest('dist')
],
cb
);
});
```
To help properly handle error conditions with Node streams, this project
recommends the use of [`pump`](https://github.com/mafintosh/pump). For more
information, see [Why Use Pump?](docs/why-use-pump/README.md#why-use-pump).
## Options

@@ -89,3 +99,37 @@

To handle errors across your entire pipeline, see the
[gulp](https://github.com/gulpjs/gulp/blob/master/docs/recipes/combining-streams-to-handle-errors.md#combining-streams-to-handle-errors) documentation.
## 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 "minifier" entry point.
```javascript
var uglifyjs = require('uglify-js'); // can be a git checkout
// or another module (such as `uglify-js-harmony` for ES6 support)
var minifer = require('gulp-uglify/minifier');
var pump = require('pump');
gulp.task('compress', function (cb) {
// the same options as described above
var options = {
preserveComments: 'license'
};
pump([
gulp.src('lib/*.js'),
minifier(options, uglifyjs),
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]: http://browsenpm.org/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
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc