terinjokes/gulp-uglify
terinjokes/gulp-uglify has 1,211 GitHub stars and 147 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-09 07:43 UTC. Last push 2021-06-23.
Minify files with UglifyJS
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalgulp-uglify 




Minify JavaScript with UglifyJS3.
Installation
Install package with NPM and add it to your development dependencies:
npm install --save-dev gulp-uglify
Usage
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,
from readable-stream.
Options
Most of the minify options from the UglifyJS API are supported. There are a few exceptions:
- The
sourceMapoption must not be set, as it will be automatically configured based on your Gulp configuration. See the documentation for Gulp sourcemaps.
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(ormsg)filenameline
To see useful error messages, see 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.
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
);
});
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,398 starspublic-apis/public-apis
A collective list of free APIs
497,679 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
447,495 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,261 stars