esmall

4.0.11 • Public • Published

esmall

a simple minifier for for es+ code

How it works

Just a little wrapper around babili

Using the cli

$ npm install --global esmall
$ esmall input.js // output to stdout
$ esmall input.js -o output.min.js // output to file
$ cat path/to/file.js | esmall > this-works.min.js

API

Basic Usage

var Esmall = require('esmall');
var esmall = new Esmall({
  // put babili options here
});
var minified = esmall.minify('code');

Stream API

var fs = require('fs');

var Esmall = require('esmall');
var esmall = new Esmall({
  // put babili options here
});

fs.createReadStream('path/to/file.js')
  .pipe(esmall)
  .pipe(process.stdout);

This is gross

I know 🎉

TODO

  • allow cli to work with multiple files

License

Apache v2.0

/esmall/

    Package Sidebar

    Install

    npm i esmall

    Weekly Downloads

    5

    Version

    4.0.11

    License

    Apache-2.0

    Unpacked Size

    21.5 kB

    Total Files

    12

    Last publish

    Collaborators

    • knish
    • mylesborins