mirror of
https://github.com/S2-/ejs-render-remote
synced 2025-08-04 13:20:06 +02:00
Compare commits
7 Commits
v1.0.8
...
936d5c1d94
Author | SHA1 | Date | |
---|---|---|---|
![]() |
936d5c1d94 | ||
![]() |
ef5fc54946 | ||
![]() |
df262d40f4 | ||
![]() |
cd74e87dd3 | ||
![]() |
672b80f5a3 | ||
![]() |
2cde5f1226 | ||
37a2512f4b |
@@ -61,18 +61,12 @@
|
|||||||
|
|
||||||
//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(templateUrl);
|
d.resolve();
|
||||||
} else {
|
} else {
|
||||||
$.get(templateUrl)
|
$.get(templateUrl)
|
||||||
.then(function(template) {
|
.then(function(template) {
|
||||||
var templateOptions = overwriteWithCacheOptions(options, templateUrl);
|
var templateOptions = overwriteWithCacheOptions(options, templateUrl);
|
||||||
try {
|
var templateFn = ejs.compile(template, templateOptions);
|
||||||
var templateFn = ejs.compile(template, templateOptions);
|
|
||||||
} catch(ex) {
|
|
||||||
console.error(templateUrl, ex);
|
|
||||||
d.reject(ex);
|
|
||||||
throw ex;
|
|
||||||
}
|
|
||||||
ejs.cache.set(templateUrl, templateFn);
|
ejs.cache.set(templateUrl, templateFn);
|
||||||
|
|
||||||
d.resolve(templateUrl);
|
d.resolve(templateUrl);
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ejs-render-remote",
|
"name": "ejs-render-remote",
|
||||||
"version": "1.0.8",
|
"version": "1.0.6",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"homepage": "https://github.com/S2-/ejs-render-remote",
|
"homepage": "https://github.com/S2-/ejs-render-remote",
|
||||||
@@ -9,9 +9,5 @@
|
|||||||
},
|
},
|
||||||
"author": "s2 <s2@31337.it>",
|
"author": "s2 <s2@31337.it>",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"keywords": [
|
"keywords": ["ejs", "templating", "client-side"]
|
||||||
"ejs",
|
|
||||||
"templating",
|
|
||||||
"client-side"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user