Get unlimited public & private packages + team-based management with npm Teams.Learn more »

gulp-babel-minify

0.5.1 • Public • Published

gulp-babel-minify

Installation

npm install gulp-babel-minify --save-dev

Usage

const gulp = require("gulp");
const minify = require("gulp-babel-minify");
 
gulp.task("minify", () =>
  gulp.src("./build/app.js")
    .pipe(minify({
      mangle: {
        keepClassName: true
      }
    }))
    .pipe(gulp.dest("./dist"));
);

API

gulpBabelMinify(minifyOptions, overrides);

minifyOptions

These are passed on to the minify preset. Refer https://github.com/babel/minify/tree/master/packages/babel-preset-minify#options. Default {}

Overrides

Default: {}

  • babel: Use a custom @babel/core
  • minifyPreset: Use a custom babel-preset-minify
  • comments: [Function | RegExp | Boolean]

Install

npm i gulp-babel-minify

DownloadsWeekly Downloads

2,799

Version

0.5.1

License

MIT

Unpacked Size

4.86 kB

Total Files

4

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar