Socket
Book a DemoInstallSign in
Socket

gulp-uglify-es

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-uglify-es

gulp stream to uglify with 'terser' (es6 supported).

3.0.0
latest
Source
npmnpm
Version published
Weekly downloads
39K
-2.93%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-uglify-es

gulp stream to uglify with 'terser' (es6 supported).

terser is the new 'uglify-es'. uglify-es is no longer maintained.

Install

npm install --save-dev gulp-uglify-es

Usage

gulpfile.js

let gulp = require("gulp");
let rename = require("gulp-rename");
let uglify = require('gulp-uglify-es').default;

gulp.task("uglify", function () {
	return gulp.src("lib/bundle.js")
		.pipe(rename("bundle.min.js"))
		.pipe(uglify(/* options */))
		.pipe(gulp.dest("lib/"));
});

For documentation about the options-object, See the Uglify API Reference.

Source maps

To generate source maps, use gulp-sourcemaps.
Example:

let gulp = require("gulp");
let rename = require("gulp-rename");
var sourcemaps = require('gulp-sourcemaps');
let uglify = require('gulp-uglify-es').default;

gulp.task("uglify", function () {
	return gulp.src("lib/bundle.js")
		.pipe(rename("bundle.min.js"))
		.pipe(sourcemaps.init())
		.pipe(uglify())
		.pipe(sourcemaps.write()) // Inline source maps.
		// For external source map file:
		//.pipe(sourcemaps.write("./maps")) // In this case: lib/maps/bundle.min.js.map
		.pipe(gulp.dest("lib/"));
});

Keywords

minify

FAQs

Package last updated on 26 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.