gulp-uglify-es
gulp stream to uglify with 'uglify-es' (es6 supported).
Last updated 7 years ago by itayronen .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install gulp-uglify-es 
SYNC missed versions from official npm registry.

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/"));
});

Current Tags

  • 3.0.0                                ...           latest (3 years ago)

20 Versions

  • 3.0.0                                ...           3 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.4                                ...           7 years ago
  • 1.0.3                                ...           7 years ago
  • 1.0.2                                ...           7 years ago
  • 1.0.1                                ...           7 years ago
  • 1.0.0                                ...           7 years ago
  • 0.2.0                                ...           7 years ago
  • 0.1.11                                ...           7 years ago
  • 0.1.10                                ...           7 years ago
  • 0.1.9                                ...           7 years ago
  • 0.1.8                                ...           7 years ago
  • 0.1.7                                ...           7 years ago
  • 0.1.6                                ...           7 years ago
  • 0.1.5                                ...           7 years ago
  • 0.1.4                                ...           7 years ago
  • 0.1.3                                ...           7 years ago
  • 0.1.2                                ...           7 years ago
  • 0.1.1                                ...           7 years ago
  • 0.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 7
Last Day 0
Last Week 7
Last Month 0
Dependencies (5)
Dev Dependencies (16)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |