Nonviolent Pigeon Manifestation
Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

minify

4.1.0 • Public • Published

Minify License Dependency Status Build Status NPM version

Minify - a minifier of js, css, html and img files. To use minify as middleware try Mollify.

Install

npm i minify

How to use?

minify can be used as a promise:

const minify = require('minify');
 
minify('./client.js')
    .then(console.log)
    .catch(console.error);
 

Or with async-await and try-to-catch:

const minify = require('minify');
const tryToCatch = require('try-to-catch');
 
async () => {
    const [error, data] = await tryToCatch(minify, './client.js');
    
    if (error)
        return console.error(error.message);
    
    console.log(data);
}();

License

MIT

install

npm i minify

Downloadsweekly downloads

10,814

version

4.1.0

license

MIT

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability