This commit is contained in:
s2
2019-04-18 15:10:03 +02:00
parent 018ccb7e08
commit 883bc2fc85
11 changed files with 121 additions and 79 deletions

View File

@@ -14,12 +14,6 @@
//if the template is already cached, return it and we are done //if the template is already cached, return it and we are done
if (templateFn) { if (templateFn) {
//but first check if there is still a getter function for this template in the cache
//if yes, remove it so we clean up a bit
if (ejs.cache.remove && ejs.cache.get('getFnFor' + templateUrl)) {
ejs.cache.remove('getFnFor' + templateUrl);
}
return templateFn(data); return templateFn(data);
} else { //if the template is not cached, we need to get it and render it later once we have it. remember: this happens only if the template is not already cached } else { //if the template is not cached, we need to get it and render it later once we have it. remember: this happens only if the template is not already cached
@@ -41,6 +35,11 @@
filename: templateUrl filename: templateUrl
} }
)); ));
//clean up the getFnFor
if (ejs.cache.remove && ejs.cache.get('getFnFor' + templateUrl)) {
ejs.cache.remove('getFnFor' + templateUrl);
}
}); });
return '<span class="ejs-templateplaceholder" style="display: none;" id="' + r + '"></span>'; return '<span class="ejs-templateplaceholder" style="display: none;" id="' + r + '"></span>';

View File

@@ -1,27 +1,28 @@
{ {
"_from": "ejs-render-remote@^1.0.3", "_from": "ejs-render-remote@1.0.4",
"_id": "ejs-render-remote@1.0.3", "_id": "ejs-render-remote@1.0.4",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-5Tj0RGLQvBlpZdT1y1F/k7S4ayv9/WkljL/T2PiTJSh5NT4mgm2G+kPXYorfZyb4pomMqDc1vSo+VbLaaLHACg==", "_integrity": "sha512-3DvdLYDVIIM7qNBUAIfxJjkhmfq8vg36Cqh0nQSqEz17DEaPELLjxYTjfFOYgvirUN4o+Fla2ulBsEnK+5MnTg==",
"_location": "/ejs-render-remote", "_location": "/ejs-render-remote",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
"type": "range", "type": "version",
"registry": true, "registry": true,
"raw": "ejs-render-remote@^1.0.3", "raw": "ejs-render-remote@1.0.4",
"name": "ejs-render-remote", "name": "ejs-render-remote",
"escapedName": "ejs-render-remote", "escapedName": "ejs-render-remote",
"rawSpec": "^1.0.3", "rawSpec": "1.0.4",
"saveSpec": null, "saveSpec": null,
"fetchSpec": "^1.0.3" "fetchSpec": "1.0.4"
}, },
"_requiredBy": [ "_requiredBy": [
"#USER",
"/" "/"
], ],
"_resolved": "https://registry.npmjs.org/ejs-render-remote/-/ejs-render-remote-1.0.3.tgz", "_resolved": "https://registry.npmjs.org/ejs-render-remote/-/ejs-render-remote-1.0.4.tgz",
"_shasum": "425ae3451c557bfddf4fcc7e790545338068a865", "_shasum": "68556c9ebceb5bb4b5a74fb06a20cd3e4a834890",
"_spec": "ejs-render-remote@^1.0.3", "_spec": "ejs-render-remote@1.0.4",
"_where": "F:\\projects\\vanillajs-seed", "_where": "F:\\projects\\p\\vanillajs-seed",
"author": { "author": {
"name": "s2", "name": "s2",
"email": "s2@31337.it" "email": "s2@31337.it"
@@ -41,5 +42,5 @@
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"version": "1.0.3" "version": "1.0.4"
} }

6
node_modules/mime-db/HISTORY.md generated vendored
View File

@@ -1,3 +1,9 @@
1.39.0 / 2019-04-04
===================
* Add extensions `.siv` and `.sieve` to `application/sieve`
* Add new upstream MIME types
1.38.0 / 2019-02-04 1.38.0 / 2019-02-04
=================== ===================

26
node_modules/mime-db/db.json generated vendored
View File

@@ -102,6 +102,18 @@
"compressible": true, "compressible": true,
"extensions": ["atomsvc"] "extensions": ["atomsvc"]
}, },
"application/atsc-dwd+xml": {
"source": "iana",
"compressible": true
},
"application/atsc-held+xml": {
"source": "iana",
"compressible": true
},
"application/atsc-rsat+xml": {
"source": "iana",
"compressible": true
},
"application/atxml": { "application/atxml": {
"source": "iana" "source": "iana"
}, },
@@ -801,6 +813,10 @@
"application/mikey": { "application/mikey": {
"source": "iana" "source": "iana"
}, },
"application/mmt-aei+xml": {
"source": "iana",
"compressible": true
},
"application/mmt-usd+xml": { "application/mmt-usd+xml": {
"source": "iana", "source": "iana",
"compressible": true "compressible": true
@@ -939,6 +955,9 @@
"source": "apache", "source": "apache",
"extensions": ["onetoc","onetoc2","onetmp","onepkg"] "extensions": ["onetoc","onetoc2","onetmp","onepkg"]
}, },
"application/oscore": {
"source": "iana"
},
"application/oxps": { "application/oxps": {
"source": "iana", "source": "iana",
"extensions": ["oxps"] "extensions": ["oxps"]
@@ -1314,7 +1333,8 @@
"extensions": ["shf"] "extensions": ["shf"]
}, },
"application/sieve": { "application/sieve": {
"source": "iana" "source": "iana",
"extensions": ["siv","sieve"]
}, },
"application/simple-filter+xml": { "application/simple-filter+xml": {
"source": "iana", "source": "iana",
@@ -6552,6 +6572,10 @@
"compressible": false, "compressible": false,
"extensions": ["jpx","jpf"] "extensions": ["jpx","jpf"]
}, },
"image/jxr": {
"source": "iana",
"extensions": ["jxr"]
},
"image/ktx": { "image/ktx": {
"source": "iana", "source": "iana",
"extensions": ["ktx"] "extensions": ["ktx"]

32
node_modules/mime-db/package.json generated vendored
View File

@@ -1,27 +1,27 @@
{ {
"_from": "mime-db@~1.38.0", "_from": "mime-db@~1.39.0",
"_id": "mime-db@1.38.0", "_id": "mime-db@1.39.0",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==", "_integrity": "sha512-DTsrw/iWVvwHH+9Otxccdyy0Tgiil6TWK/xhfARJZF/QFhwOgZgOIvA2/VIGpM8U7Q8z5nDmdDWC6tuVMJNibw==",
"_location": "/mime-db", "_location": "/mime-db",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
"type": "range", "type": "range",
"registry": true, "registry": true,
"raw": "mime-db@~1.38.0", "raw": "mime-db@~1.39.0",
"name": "mime-db", "name": "mime-db",
"escapedName": "mime-db", "escapedName": "mime-db",
"rawSpec": "~1.38.0", "rawSpec": "~1.39.0",
"saveSpec": null, "saveSpec": null,
"fetchSpec": "~1.38.0" "fetchSpec": "~1.39.0"
}, },
"_requiredBy": [ "_requiredBy": [
"/mime-types" "/mime-types"
], ],
"_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.39.0.tgz",
"_shasum": "1a2aab16da9eb167b49c6e4df2d9c68d63d8e2ad", "_shasum": "f95a20275742f7d2ad0429acfe40f4233543780e",
"_spec": "mime-db@~1.38.0", "_spec": "mime-db@~1.39.0",
"_where": "F:\\projects\\vanillajs-seed\\node_modules\\mime-types", "_where": "F:\\projects\\p\\vanillajs-seed\\node_modules\\mime-types",
"bugs": { "bugs": {
"url": "https://github.com/jshttp/mime-db/issues" "url": "https://github.com/jshttp/mime-db/issues"
}, },
@@ -45,19 +45,19 @@
"deprecated": false, "deprecated": false,
"description": "Media Type Database", "description": "Media Type Database",
"devDependencies": { "devDependencies": {
"bluebird": "3.5.3", "bluebird": "3.5.4",
"co": "4.6.0", "co": "4.6.0",
"cogent": "1.0.1", "cogent": "1.0.1",
"csv-parse": "3.2.0", "csv-parse": "3.2.0",
"eslint": "5.13.0", "eslint": "5.16.0",
"eslint-config-standard": "12.0.0", "eslint-config-standard": "12.0.0",
"eslint-plugin-import": "2.16.0", "eslint-plugin-import": "2.16.0",
"eslint-plugin-node": "7.0.1", "eslint-plugin-node": "7.0.1",
"eslint-plugin-promise": "4.0.1", "eslint-plugin-promise": "4.1.1",
"eslint-plugin-standard": "4.0.0", "eslint-plugin-standard": "4.0.0",
"gnode": "0.1.2", "gnode": "0.1.2",
"mocha": "5.2.0", "mocha": "6.0.2",
"nyc": "13.2.0", "nyc": "13.3.0",
"raw-body": "2.3.3", "raw-body": "2.3.3",
"stream-to-array": "2.3.0" "stream-to-array": "2.3.0"
}, },
@@ -97,5 +97,5 @@
"update": "npm run fetch && npm run build", "update": "npm run fetch && npm run build",
"version": "node scripts/version-history.js && git add HISTORY.md" "version": "node scripts/version-history.js && git add HISTORY.md"
}, },
"version": "1.38.0" "version": "1.39.0"
} }

7
node_modules/mime-types/HISTORY.md generated vendored
View File

@@ -1,3 +1,10 @@
2.1.23 / 2019-04-17
===================
* deps: mime-db@~1.39.0
- Add extensions `.siv` and `.sieve` to `application/sieve`
- Add new upstream MIME types
2.1.22 / 2019-02-14 2.1.22 / 2019-02-14
=================== ===================

26
node_modules/mime-types/package.json generated vendored
View File

@@ -1,8 +1,8 @@
{ {
"_from": "mime-types@~2.1.19", "_from": "mime-types@~2.1.19",
"_id": "mime-types@2.1.22", "_id": "mime-types@2.1.23",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", "_integrity": "sha512-ROk/m+gMVSrRxTkMlaQOvFmFmYDc7sZgrjjM76abqmd2Cc5fCV7jAMA5XUccEtJ3cYiYdgixUVI+fApc2LkXlw==",
"_location": "/mime-types", "_location": "/mime-types",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
@@ -19,10 +19,10 @@
"/form-data", "/form-data",
"/request" "/request"
], ],
"_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.23.tgz",
"_shasum": "fe6b355a190926ab7698c9a0556a11199b2199bd", "_shasum": "d4eacd87de99348a6858fe1e479aad877388d977",
"_spec": "mime-types@~2.1.19", "_spec": "mime-types@~2.1.19",
"_where": "F:\\projects\\vanillajs-seed\\node_modules\\request", "_where": "F:\\projects\\p\\vanillajs-seed\\node_modules\\request",
"bugs": { "bugs": {
"url": "https://github.com/jshttp/mime-types/issues" "url": "https://github.com/jshttp/mime-types/issues"
}, },
@@ -44,19 +44,19 @@
} }
], ],
"dependencies": { "dependencies": {
"mime-db": "~1.38.0" "mime-db": "~1.39.0"
}, },
"deprecated": false, "deprecated": false,
"description": "The ultimate javascript content-type utility.", "description": "The ultimate javascript content-type utility.",
"devDependencies": { "devDependencies": {
"eslint": "5.13.0", "eslint": "5.16.0",
"eslint-config-standard": "12.0.0", "eslint-config-standard": "12.0.0",
"eslint-plugin-import": "2.16.0", "eslint-plugin-import": "2.17.2",
"eslint-plugin-node": "7.0.1", "eslint-plugin-node": "8.0.1",
"eslint-plugin-promise": "4.0.1", "eslint-plugin-promise": "4.1.1",
"eslint-plugin-standard": "4.0.0", "eslint-plugin-standard": "4.0.0",
"mocha": "5.2.0", "mocha": "6.1.3",
"nyc": "13.3.0" "nyc": "14.0.0"
}, },
"engines": { "engines": {
"node": ">= 0.6" "node": ">= 0.6"
@@ -83,5 +83,5 @@
"test-cov": "nyc --reporter=html --reporter=text npm test", "test-cov": "nyc --reporter=html --reporter=text npm test",
"test-travis": "nyc --reporter=text npm test" "test-travis": "nyc --reporter=text npm test"
}, },
"version": "2.1.22" "version": "2.1.23"
} }

View File

@@ -67,7 +67,11 @@ minifyfromhtml --js=dist.js --css=dist.css < index.html
``` ```
=> =>
``` ```
css/mywidget.css -> dist.css some.css -> dist.css
js/jquery.js -> dist.js app.css -> dist.css
js/spectacularwidget.js -> dist.js somelib.js -> dist.js
someotherlib.js -> dist.js
awesomelib.js -> dist.js
spectacularlib.js -> dist.js
app.js -> dist.js
``` ```

View File

@@ -1,27 +1,28 @@
{ {
"_from": "minifyfromhtml@^1.1.2", "_from": "minifyfromhtml@1.1.3",
"_id": "minifyfromhtml@1.1.2", "_id": "minifyfromhtml@1.1.3",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-lHspI3e/Kklji6zWkrodevxtw0hDDUfk9L+GJ8V0G0oMIzt6HKQwfWYsWHMnKSyY4mqRL4GRytXKVEM7Aw6lPw==", "_integrity": "sha512-qYwHERSQmGZfh4A+l0n0adX2WulYN2bLSZBGBMmx5tXz6AW7jbVSx0/iq9HCd8h8+K2OZw1RdV1fiYHY4YlyUw==",
"_location": "/minifyfromhtml", "_location": "/minifyfromhtml",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
"type": "range", "type": "version",
"registry": true, "registry": true,
"raw": "minifyfromhtml@^1.1.2", "raw": "minifyfromhtml@1.1.3",
"name": "minifyfromhtml", "name": "minifyfromhtml",
"escapedName": "minifyfromhtml", "escapedName": "minifyfromhtml",
"rawSpec": "^1.1.2", "rawSpec": "1.1.3",
"saveSpec": null, "saveSpec": null,
"fetchSpec": "^1.1.2" "fetchSpec": "1.1.3"
}, },
"_requiredBy": [ "_requiredBy": [
"#DEV:/" "#DEV:/",
"#USER"
], ],
"_resolved": "https://registry.npmjs.org/minifyfromhtml/-/minifyfromhtml-1.1.2.tgz", "_resolved": "https://registry.npmjs.org/minifyfromhtml/-/minifyfromhtml-1.1.3.tgz",
"_shasum": "ce4d4d7e0f9a19d08e35d27c231bd6d2cf491b5f", "_shasum": "fa771813d5cb616d327b15d8e823a96eaf738039",
"_spec": "minifyfromhtml@^1.1.2", "_spec": "minifyfromhtml@1.1.3",
"_where": "F:\\projects\\vanillajs-seed", "_where": "F:\\projects\\p\\vanillajs-seed",
"author": "", "author": "",
"bin": { "bin": {
"minifyfromhtml": "./minifyfromhtml.js" "minifyfromhtml": "./minifyfromhtml.js"
@@ -48,5 +49,5 @@
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"version": "1.1.2" "version": "1.1.3"
} }

26
package-lock.json generated
View File

@@ -256,9 +256,9 @@
"integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==" "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ=="
}, },
"ejs-render-remote": { "ejs-render-remote": {
"version": "1.0.3", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/ejs-render-remote/-/ejs-render-remote-1.0.3.tgz", "resolved": "https://registry.npmjs.org/ejs-render-remote/-/ejs-render-remote-1.0.4.tgz",
"integrity": "sha512-5Tj0RGLQvBlpZdT1y1F/k7S4ayv9/WkljL/T2PiTJSh5NT4mgm2G+kPXYorfZyb4pomMqDc1vSo+VbLaaLHACg==" "integrity": "sha512-3DvdLYDVIIM7qNBUAIfxJjkhmfq8vg36Cqh0nQSqEz17DEaPELLjxYTjfFOYgvirUN4o+Fla2ulBsEnK+5MnTg=="
}, },
"es6-promise": { "es6-promise": {
"version": "4.2.6", "version": "4.2.6",
@@ -557,18 +557,18 @@
"dev": true "dev": true
}, },
"mime-db": { "mime-db": {
"version": "1.38.0", "version": "1.39.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.39.0.tgz",
"integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==", "integrity": "sha512-DTsrw/iWVvwHH+9Otxccdyy0Tgiil6TWK/xhfARJZF/QFhwOgZgOIvA2/VIGpM8U7Q8z5nDmdDWC6tuVMJNibw==",
"dev": true "dev": true
}, },
"mime-types": { "mime-types": {
"version": "2.1.22", "version": "2.1.23",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.23.tgz",
"integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", "integrity": "sha512-ROk/m+gMVSrRxTkMlaQOvFmFmYDc7sZgrjjM76abqmd2Cc5fCV7jAMA5XUccEtJ3cYiYdgixUVI+fApc2LkXlw==",
"dev": true, "dev": true,
"requires": { "requires": {
"mime-db": "~1.38.0" "mime-db": "~1.39.0"
} }
}, },
"minify": { "minify": {
@@ -587,9 +587,9 @@
} }
}, },
"minifyfromhtml": { "minifyfromhtml": {
"version": "1.1.2", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/minifyfromhtml/-/minifyfromhtml-1.1.2.tgz", "resolved": "https://registry.npmjs.org/minifyfromhtml/-/minifyfromhtml-1.1.3.tgz",
"integrity": "sha512-lHspI3e/Kklji6zWkrodevxtw0hDDUfk9L+GJ8V0G0oMIzt6HKQwfWYsWHMnKSyY4mqRL4GRytXKVEM7Aw6lPw==", "integrity": "sha512-qYwHERSQmGZfh4A+l0n0adX2WulYN2bLSZBGBMmx5tXz6AW7jbVSx0/iq9HCd8h8+K2OZw1RdV1fiYHY4YlyUw==",
"dev": true, "dev": true,
"requires": { "requires": {
"jsdom": "^14.0.0", "jsdom": "^14.0.0",

View File

@@ -11,7 +11,7 @@
"dependencies": { "dependencies": {
"bootstrap": "^4.3.1", "bootstrap": "^4.3.1",
"ejs": "^2.6.1", "ejs": "^2.6.1",
"ejs-render-remote": "^1.0.3", "ejs-render-remote": "^1.0.4",
"es6-promise": "^4.2.6", "es6-promise": "^4.2.6",
"i18next": "^15.0.9", "i18next": "^15.0.9",
"i18next-browser-languagedetector": "^3.0.1", "i18next-browser-languagedetector": "^3.0.1",
@@ -22,6 +22,6 @@
"popper.js": "^1.15.0" "popper.js": "^1.15.0"
}, },
"devDependencies": { "devDependencies": {
"minifyfromhtml": "^1.1.2" "minifyfromhtml": "^1.1.3"
} }
} }