mirror of
https://github.com/S2-/ejs-render-remote
synced 2025-08-03 13:00:04 +02:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
8c9f23ce3f | |||
94d5afe1a0 | |||
f5a44438d1 | |||
06b2289724 |
@@ -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($) {
|
(function($) {
|
||||||
var uuidv4 = function() {
|
var uuidv4 = function() {
|
||||||
@@ -16,11 +16,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
var templateOptions = options || {};
|
var templateOptions = options || {};
|
||||||
for (var attrname in cacheOptions) {
|
|
||||||
templateOptions[attrname] = cacheOptions[attrname];
|
|
||||||
}
|
|
||||||
|
|
||||||
return templateOptions;
|
return $.extend(templateOptions, cacheOptions);
|
||||||
};
|
};
|
||||||
|
|
||||||
ejs.rr = function(templateUrl, data, options) {
|
ejs.rr = function(templateUrl, data, options) {
|
||||||
@@ -64,7 +61,7 @@
|
|||||||
|
|
||||||
//if the template is already cached, just return.
|
//if the template is already cached, just return.
|
||||||
if (ejs.cache.get(templateUrl)) {
|
if (ejs.cache.get(templateUrl)) {
|
||||||
d.resolve();
|
d.resolve(templateUrl);
|
||||||
} else {
|
} else {
|
||||||
$.get(templateUrl)
|
$.get(templateUrl)
|
||||||
.then(function(template) {
|
.then(function(template) {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ejs-render-remote",
|
"name": "ejs-render-remote",
|
||||||
"version": "1.0.5",
|
"version": "1.0.7",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"homepage": "https://github.com/S2-/ejs-render-remote",
|
"homepage": "https://github.com/S2-/ejs-render-remote",
|
||||||
|
Reference in New Issue
Block a user