Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

gulp-terser

1.1.7 • Public • Published

gulp-terser

Gulp plugin, compressed es6+ code.

Install

$ npm install gulp-terser --save-dev

or

$ yarn add gulp-terser --dev

How to use

const gulp = require('gulp');
const terser = require('gulp-terser');
 
function es(){
  return gulp.src('./src/index.js')
    .pipe(terser())
    .pipe(gulp.dest('./build'));
}
 
gulp.task('default', es);

Options

Terser configuration can be viewed https://github.com/terser-js/terser#minify-options.

const gulp = require('gulp');
const terser = require('gulp-terser');
 
function es(){
  return gulp.src('./src/index.js')
    .pipe(terser({
      keep_fnames: true,
      mangle: false
    }))
    .pipe(gulp.dest('./build'));
}
 
gulp.task('default', es);

install

npm i gulp-terser

Downloadsweekly downloads

6,957

version

1.1.7

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability