1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-03 12:20:04 +02:00

update minify

This commit is contained in:
s2
2020-02-07 22:55:28 +01:00
parent 439b2733a6
commit 9dc253a6be
77 changed files with 6154 additions and 24560 deletions

11
node_modules/minify/bin/minify.js generated vendored Normal file → Executable file
View File

@@ -14,7 +14,7 @@ const Argv = process.argv;
const files = Argv.slice(2);
const [In] = files;
log.error = function(e) {
log.error = (e) => {
console.error(e);
process.stdin.pause();
};
@@ -27,7 +27,7 @@ process.on('uncaughtException', (error) => {
minify();
function readStd(callback) {
const stdin = process.stdin;
const {stdin} = process;
let chunks = '';
const read = () => {
const chunk = stdin.read();
@@ -66,9 +66,10 @@ function processStream(chunks) {
const name = In.replace('--', '');
const [e, data] = tryCatch(minify[name], chunks);
if (e)
return log.error(e);
log(data);
}
@@ -93,8 +94,8 @@ function help() {
console.log(usage);
console.log('Options:');
Object.keys(bin).forEach((name) => {
for (const name of Object.keys(bin)) {
console.log(' %s %s', name, bin[name]);
});
}
}