duo-uglify

A duo alternate plugin for compressing a JS build

Usage no npm install needed!

<script type="module">
  import duoUglify from 'https://cdn.skypack.dev/duo-uglify';
</script>

README

Build Status

duo-uglify

An uglify plugin for use in duo builds

Installation

$ npm install duo-uglify

Usage

$ duo --use duo-uglify
var duo = require('duo');
var uglify = require('duo-uglify');

duo(__dirname)
  .use(uglify())
  .entry('index.js')
  .run(function (err, results) {
    // ...
  });

API

uglify(options)

Generates a duo plugin function. Any options will be passed directly to UglifyJS.minify().

This plugin will automatically detect source-maps support.