minify-js

Extremely fast JavaScript minifier, written in Rust.

Goals

Features

Usage

CLI

Precompiled binaries are available for Linux, macOS, and Windows.

Linux x64 | macOS x64 | Windows x64

Use the --help argument for more details.

bash minify-js --output /path/to/output.min.js /path/to/src.js

Rust

Add the dependency:

toml [dependencies] minify-js = "0.1.1"

Call the method:

```rust use minify_js::minify;

let mut code: &[u8] = b"let x = 1;"; let mut out = Vec::new(); minify(code.tovec(), &mut out).unwrap(); asserteq!(out.as_slice(), b"let x=1"); ```

In progress