update deps
This commit is contained in:
17
node_modules/minify/ChangeLog
generated
vendored
17
node_modules/minify/ChangeLog
generated
vendored
@@ -1,3 +1,20 @@
|
||||
2019.07.11, v4.1.3
|
||||
|
||||
feature:
|
||||
- (minify) forEach -> for-of
|
||||
|
||||
|
||||
2019.06.23, v4.1.2
|
||||
|
||||
feature:
|
||||
- (package) html-minifier v4.0.0
|
||||
- (package) terser v4.0.0
|
||||
- (package) eslint v6.0.0
|
||||
- (minify) add madrun
|
||||
- (package) eslint-plugin-node v9.1.0
|
||||
- (package) nyc v14.1.1
|
||||
|
||||
|
||||
2019.02.22, v4.1.1
|
||||
|
||||
fix:
|
||||
|
2
node_modules/minify/LICENSE
generated
vendored
2
node_modules/minify/LICENSE
generated
vendored
@@ -1,6 +1,6 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2012-2016 Coderaiser <mnemonic.enemy@gmail.com>
|
||||
Copyright (c) 2012-2019 Coderaiser <mnemonic.enemy@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
9
node_modules/minify/bin/minify.js
generated
vendored
Normal file → Executable file
9
node_modules/minify/bin/minify.js
generated
vendored
Normal file → Executable file
@@ -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]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
1
node_modules/minify/lib/css.js
generated
vendored
1
node_modules/minify/lib/css.js
generated
vendored
@@ -1,4 +1,5 @@
|
||||
/* сжимаем код через clean-css */
|
||||
|
||||
'use strict';
|
||||
|
||||
const assert = require('assert');
|
||||
|
2
node_modules/minify/lib/html.js
generated
vendored
2
node_modules/minify/lib/html.js
generated
vendored
@@ -25,7 +25,7 @@ const Options = {
|
||||
removeStyleLinkTypeAttributes: true,
|
||||
|
||||
minifyJS: true,
|
||||
minifyCSS: true
|
||||
minifyCSS: true,
|
||||
};
|
||||
|
||||
/**
|
||||
|
8
node_modules/minify/lib/img.js
generated
vendored
8
node_modules/minify/lib/img.js
generated
vendored
@@ -2,13 +2,11 @@
|
||||
|
||||
const path = require('path');
|
||||
const assert = require('assert');
|
||||
const {
|
||||
promisify,
|
||||
} = require('util');
|
||||
const {promisify} = require('util');
|
||||
|
||||
const fromString = promisify(require('css-b64-images').fromString);
|
||||
|
||||
const ONE_KB = Math.pow(2, 10);
|
||||
const ONE_KB = 2 ** 10;
|
||||
|
||||
const maxSize = 100 * ONE_KB;
|
||||
|
||||
@@ -27,7 +25,7 @@ module.exports = async (name, data) => {
|
||||
assert(data);
|
||||
|
||||
return fromString(data, dir, dirRelative, {
|
||||
maxSize
|
||||
maxSize,
|
||||
});
|
||||
};
|
||||
|
||||
|
9
node_modules/minify/lib/minify.js
generated
vendored
9
node_modules/minify/lib/minify.js
generated
vendored
@@ -4,18 +4,16 @@ const DIR = __dirname + '/';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const {
|
||||
promisify,
|
||||
} = require('util');
|
||||
const {promisify} = require('util');
|
||||
|
||||
const tryToCatch = require('try-to-catch');
|
||||
const readFile = promisify(fs.readFile);
|
||||
|
||||
const log = require('debug')('minify');
|
||||
|
||||
['js', 'html', 'css', 'img'].forEach((name) => {
|
||||
for (const name of ['js', 'html', 'css', 'img']) {
|
||||
minify[name] = require(DIR + name);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = minify;
|
||||
|
||||
@@ -76,6 +74,7 @@ async function onDataRead(filename, data) {
|
||||
const optimizedData = await minify[ext](data);
|
||||
|
||||
let b64Optimize;
|
||||
|
||||
if (ext === 'css')
|
||||
[, b64Optimize] = await tryToCatch(minify.img, filename, optimizedData);
|
||||
|
||||
|
41
node_modules/minify/package.json
generated
vendored
41
node_modules/minify/package.json
generated
vendored
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"_from": "minify@^4.1.1",
|
||||
"_id": "minify@4.1.1",
|
||||
"_id": "minify@4.1.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-D99KM2lBtJbAAAtKkekL5R1rCFQqhx2dMeFl5etybEdTwGjMYvPsWPDH0CSxTXWSmI2Q7Tx7Gx4rRxik5ahgQA==",
|
||||
"_integrity": "sha512-ykuscavxivSmVpcCzsXmsVTukWYLUUtPhHj0w2ILvHDGqC+hsuTCihBn9+PJBd58JNvWTNg9132J9nrrI2anzA==",
|
||||
"_location": "/minify",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
@@ -18,10 +18,10 @@
|
||||
"_requiredBy": [
|
||||
"/minifyfromhtml"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/minify/-/minify-4.1.1.tgz",
|
||||
"_shasum": "06d7a6faf5c171ac3075b79e5afdbe606c0c1fe5",
|
||||
"_resolved": "https://registry.npmjs.org/minify/-/minify-4.1.3.tgz",
|
||||
"_shasum": "58467922d14303f55a3a28fa79641371955b8fbd",
|
||||
"_spec": "minify@^4.1.1",
|
||||
"_where": "F:\\projects\\vanillajs-seed\\node_modules\\minifyfromhtml",
|
||||
"_where": "/home/s2/Code/vanillajs-seed/node_modules/minifyfromhtml",
|
||||
"author": {
|
||||
"name": "coderaiser",
|
||||
"email": "mnemonic.enemy@gmail.com",
|
||||
@@ -38,8 +38,8 @@
|
||||
"clean-css": "^4.1.6",
|
||||
"css-b64-images": "~0.2.5",
|
||||
"debug": "^4.1.0",
|
||||
"html-minifier": "^3.0.1",
|
||||
"terser": "^3.16.1",
|
||||
"html-minifier": "^4.0.0",
|
||||
"terser": "^4.0.0",
|
||||
"try-catch": "^2.0.0",
|
||||
"try-to-catch": "^1.0.2"
|
||||
},
|
||||
@@ -47,12 +47,15 @@
|
||||
"description": "Minifier of js, css, html and img",
|
||||
"devDependencies": {
|
||||
"coveralls": "^3.0.0",
|
||||
"eslint": "^5.7.0",
|
||||
"eslint-plugin-node": "^8.0.0",
|
||||
"nyc": "^13.1.0",
|
||||
"eslint": "^6.0.0",
|
||||
"eslint-plugin-node": "^9.1.0",
|
||||
"eslint-plugin-putout": "^1.5.0",
|
||||
"madrun": "^2.1.2",
|
||||
"nyc": "^14.1.1",
|
||||
"putout": "^4.32.0",
|
||||
"redrun": "^7.0.2",
|
||||
"rimraf": "^2.6.1",
|
||||
"tape": "^4.2.2"
|
||||
"supertape": "^1.2.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.0.0"
|
||||
@@ -78,12 +81,14 @@
|
||||
"url": "git+ssh://git@github.com/coderaiser/minify.git"
|
||||
},
|
||||
"scripts": {
|
||||
"coverage": "nyc npm test",
|
||||
"lint": "redrun lint:*",
|
||||
"lint:bin": "eslint --rule no-console:0 bin",
|
||||
"lint:lib": "eslint lib test",
|
||||
"report": "nyc report --reporter=text-lcov | coveralls",
|
||||
"test": "tape test/minify.js"
|
||||
"coverage": "madrun coverage",
|
||||
"fix:lint": "madrun fix:lint",
|
||||
"lint": "madrun lint",
|
||||
"lint:bin": "madrun lint:bin",
|
||||
"lint:lib": "madrun lint:lib",
|
||||
"putout": "madrun putout",
|
||||
"report": "madrun report",
|
||||
"test": "madrun test"
|
||||
},
|
||||
"version": "4.1.1"
|
||||
"version": "4.1.3"
|
||||
}
|
||||
|
Reference in New Issue
Block a user