An open API service indexing awesome lists of open source software.

https://github.com/bestikk/bestikk-uglify

A simple tool to uglify JavaScript files based on Google Closure Compile
https://github.com/bestikk/bestikk-uglify

build-tool javascript uglify

Last synced: about 1 year ago
JSON representation

A simple tool to uglify JavaScript files based on Google Closure Compile

Awesome Lists containing this project

README

          

# Bestikk Uglify

ifdef::env-github[]
image:https://github.com/bestikk/bestikk-uglify/actions/workflows/ci.yml/badge.svg[Build status, link=https://github.com/bestikk/bestikk-uglify/actions/workflows/ci.yml]
image:http://img.shields.io/npm/v/bestikk-uglify.svg[npm version, link=https://www.npmjs.org/package/bestikk-uglify]
endif::[]

A simple tool to uglify JavaScript files based on Google Closure Compiler.

## Install

$ npm i --save-dev bestikk-uglify

## Usage

IMPORTANT: Google Closure Compiler requires Java 7 or higher and `java` binary must be available in your `PATH`.

```javascript
var uglify = require('bestikk-uglify')

uglify.minify('index.js', 'index.min.js')
.then(() => /* do something * /) // <1>
```
<1> `minify` function returns a `Promise`.