![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | bin/ | 2 years ago | - | |
![]() | lib/ | 2 years ago | - | |
![]() | node_modules/ | 2 years ago | - | |
![]() | ChangeLog | 2 years ago | 15K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | HELP.md | 2 years ago | 2.1K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | LICENSE | 2 years ago | 1.1K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | README.md | 2 years ago | 1.9K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | help.json | 2 years ago | 286 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | package.json | 2 years ago | 2.4K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
Minify - a minifier of js, css, html and img files.
To use minify
as middleware try Mollify.
npm i minify -g
$ 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]);
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);
}();
MIT