/ piacw.com / dev / final / node_modules / minify /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]bin/2 years ago -  
[DIR]lib/2 years ago -  
[DIR]node_modules/2 years ago -  
[   ]ChangeLog2 years ago 15K0fb859dc fixed mobile overflwo options [كارل مبارك]
[TXT]HELP.md2 years ago2.1K0fb859dc fixed mobile overflwo options [كارل مبارك]
[   ]LICENSE2 years ago1.1K0fb859dc fixed mobile overflwo options [كارل مبارك]
[TXT]README.md2 years ago1.9K0fb859dc fixed mobile overflwo options [كارل مبارك]
[   ]help.json2 years ago286 0fb859dc fixed mobile overflwo options [كارل مبارك]
[   ]package.json2 years ago2.4K0fb859dc fixed mobile overflwo options [كارل مبارك]
README.md

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 -g

How to use?

CLI

$ cat > hello.js
const hello = 'world';

for (let i = 0; i < hello.length; i++) {
    console.log(hello[i]);
}
^D

$ minify hello.js
const hello="world";for(let l=0;l<hello.length;l++)console.log(hello[l]);

Code Example

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

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80