update deps

This commit is contained in:
s2
2019-12-20 20:02:44 +01:00
parent 14c1b72301
commit b7fa481dcb
833 changed files with 68364 additions and 18390 deletions

View File

@@ -0,0 +1,3 @@
#mywidget {
border: 2px solid blue;
}

1
node_modules/minifyfromhtml/example/dist/dist.css generated vendored Normal file
View File

@@ -0,0 +1 @@
#mywidget{border:2px solid red}

2
node_modules/minifyfromhtml/example/dist/dist.js generated vendored Normal file

File diff suppressed because one or more lines are too long

24
node_modules/minifyfromhtml/example/dist/index.html generated vendored Normal file
View File

@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Example</title>
<!-- just the minified stuff -->
<script type="text/javascript" charset="utf-8" src="dist.js"></script>
<link rel="stylesheet" type="text/css" href="dist.css" />
</head>
<body>
<div id="mywidget"></div>
<script>
//widget init
spectacularwidget(document.getElementById('mywidget'));
</script>
</body>
</html>

View File

@@ -13,7 +13,7 @@
<!-- some css -->
<link rel="stylesheet" type="text/css" href="css/mywidget.css" />
<link rel="alternate stylesheet" type="text/css" href="css/mywidget.css" />
</head>
<body>

23
node_modules/minifyfromhtml/minifyfromhtml.js generated vendored Normal file → Executable file
View File

@@ -45,19 +45,22 @@ let readStdin = function(cb) {
readStdin(function(html) {
let dom = new JSDOM(html);
let getTagAttrs = function(dom, tag, attr) {
let scripts = [];
let getTagAttrs = function(dom, tag, attr, filter) {
let elements = [];
let document = dom.window.document;
let scriptTags = document.getElementsByTagName(tag);
let i = scriptTags.length;
for (let i = 0; i < scriptTags.length; i++) {
let src = scriptTags[i].getAttribute(attr);
if (src) {
scripts.push(src);
let elementTags = document.getElementsByTagName(tag);
let i = elementTags.length;
for (let i = 0; i < elementTags.length; i++) {
if (!filter ||
(filter && elementTags[i].getAttribute(Object.keys(filter)[0]) === filter[Object.keys(filter)[0]])) {
let src = elementTags[i].getAttribute(attr);
if (src) {
elements.push(src);
}
}
}
return scripts;
return elements;
};
@@ -101,6 +104,6 @@ readStdin(function(html) {
}
if (argv.css) {
processThings(getTagAttrs(dom, 'link', 'href'), argv.css);
processThings(getTagAttrs(dom, 'link', 'href', {rel: 'stylesheet'}), argv.css);
}
});

View File

@@ -1,28 +1,28 @@
{
"_from": "minifyfromhtml@1.1.3",
"_id": "minifyfromhtml@1.1.3",
"_from": "minifyfromhtml@1.1.7",
"_id": "minifyfromhtml@1.1.7",
"_inBundle": false,
"_integrity": "sha512-qYwHERSQmGZfh4A+l0n0adX2WulYN2bLSZBGBMmx5tXz6AW7jbVSx0/iq9HCd8h8+K2OZw1RdV1fiYHY4YlyUw==",
"_integrity": "sha512-c+I3wxjVrxhUazaOhG9pLYy9FOZXuJAjztUGiiLvQTv1rzaVusiFBF6Zq947DyXwJIL4p2DK/6hXAArsriDfKA==",
"_location": "/minifyfromhtml",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "minifyfromhtml@1.1.3",
"raw": "minifyfromhtml@1.1.7",
"name": "minifyfromhtml",
"escapedName": "minifyfromhtml",
"rawSpec": "1.1.3",
"rawSpec": "1.1.7",
"saveSpec": null,
"fetchSpec": "1.1.3"
"fetchSpec": "1.1.7"
},
"_requiredBy": [
"#DEV:/",
"#USER"
],
"_resolved": "https://registry.npmjs.org/minifyfromhtml/-/minifyfromhtml-1.1.3.tgz",
"_shasum": "fa771813d5cb616d327b15d8e823a96eaf738039",
"_spec": "minifyfromhtml@1.1.3",
"_where": "F:\\projects\\p\\vanillajs-seed",
"_resolved": "https://registry.npmjs.org/minifyfromhtml/-/minifyfromhtml-1.1.7.tgz",
"_shasum": "74e74321f47492e0107510013d1bd7e04da77d16",
"_spec": "minifyfromhtml@1.1.7",
"_where": "/home/s2/Code/vanillajs-seed",
"author": "",
"bin": {
"minifyfromhtml": "./minifyfromhtml.js"
@@ -39,6 +39,13 @@
"deprecated": false,
"description": "minify scripts and css starting from an html file",
"homepage": "https://github.com/S2-/minifyfromhtml#readme",
"keywords": [
"minify",
"javascript",
"html",
"css",
"script"
],
"license": "ISC",
"main": "minifyfromhtml.js",
"name": "minifyfromhtml",
@@ -49,5 +56,5 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "1.1.3"
"version": "1.1.7"
}