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

@@ -1,4 +1,4 @@
//this uses jQuery for now because ie11 support is needed (promises and fetch)
//this uses jQuery for now because ie11 support is needed (promises, fetch, Object.assign)
(function($) {
var uuidv4 = function() {
@@ -9,7 +9,18 @@
});
};
ejs.rr = function(templateUrl, data) {
var overwriteWithCacheOptions = function(options, cacheName) {
var cacheOptions = {
cache: true,
filename: cacheName
};
var templateOptions = options || {};
return $.extend(templateOptions, cacheOptions);
};
ejs.rr = function(templateUrl, data, options) {
var templateFn = ejs.cache.get(templateUrl);
//if the template is already cached, return it and we are done
@@ -27,13 +38,12 @@
var r = uuidv4();
getTemplateFn.then(function(template) {
var templateOptions = overwriteWithCacheOptions(options, templateUrl);
$('#' + r).replaceWith(ejs.render(
template,
data,
{
cache: true,
filename: templateUrl
}
templateOptions
));
//clean up the getFnFor
@@ -46,21 +56,17 @@
}
};
ejs.preloadTemplate = function(templateUrl) {
ejs.preloadTemplate = function(templateUrl, options) {
var d = $.Deferred();
//if the template is already cached, just return.
if (ejs.cache.get(templateUrl)) {
d.resolve();
d.resolve(templateUrl);
} else {
$.get(templateUrl)
.then(function(template) {
var templateFn = ejs.compile(template,
{
cache: true,
filename: templateUrl
});
var templateOptions = overwriteWithCacheOptions(options, templateUrl);
var templateFn = ejs.compile(template, templateOptions);
ejs.cache.set(templateUrl, templateFn);
d.resolve(templateUrl);

View File

@@ -1,28 +1,28 @@
{
"_from": "ejs-render-remote@1.0.4",
"_id": "ejs-render-remote@1.0.4",
"_from": "ejs-render-remote@1.0.7",
"_id": "ejs-render-remote@1.0.7",
"_inBundle": false,
"_integrity": "sha512-3DvdLYDVIIM7qNBUAIfxJjkhmfq8vg36Cqh0nQSqEz17DEaPELLjxYTjfFOYgvirUN4o+Fla2ulBsEnK+5MnTg==",
"_integrity": "sha512-Yr3dk+Z1tn386sntXBZv53Ql0s+vg7clKFP6URGsZvKkPr5nyc9oJ/tAZBcodHh3y9js1u+Z4DvW7wm622HjTA==",
"_location": "/ejs-render-remote",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "ejs-render-remote@1.0.4",
"raw": "ejs-render-remote@1.0.7",
"name": "ejs-render-remote",
"escapedName": "ejs-render-remote",
"rawSpec": "1.0.4",
"rawSpec": "1.0.7",
"saveSpec": null,
"fetchSpec": "1.0.4"
"fetchSpec": "1.0.7"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/ejs-render-remote/-/ejs-render-remote-1.0.4.tgz",
"_shasum": "68556c9ebceb5bb4b5a74fb06a20cd3e4a834890",
"_spec": "ejs-render-remote@1.0.4",
"_where": "F:\\projects\\p\\vanillajs-seed",
"_resolved": "https://registry.npmjs.org/ejs-render-remote/-/ejs-render-remote-1.0.7.tgz",
"_shasum": "d741834afc9418d0b0a9eec3af8dafe014d8ff18",
"_spec": "ejs-render-remote@1.0.7",
"_where": "/home/s2/Code/vanillajs-seed",
"author": {
"name": "s2",
"email": "s2@31337.it"
@@ -42,5 +42,5 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "1.0.4"
"version": "1.0.7"
}