summaryrefslogtreecommitdiffstats
path: root/lib/templating/themesLoader.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/templating/themesLoader.js')
-rw-r--r--lib/templating/themesLoader.js50
1 files changed, 25 insertions, 25 deletions
diff --git a/lib/templating/themesLoader.js b/lib/templating/themesLoader.js
index 69c3879..bae4c12 100644
--- a/lib/templating/themesLoader.js
+++ b/lib/templating/themesLoader.js
@@ -12,11 +12,11 @@ var ThemesLoader = nunjucks.Loader.extend({
.map(path.normalize);
},
- /*
- Read source of a resolved filepath
- @param {String}
- @return {Object}
- */
+ /**
+ * Read source of a resolved filepath
+ * @param {String}
+ * @return {Object}
+ */
getSource: function(fullpath) {
if (!fullpath) return null;
@@ -40,19 +40,19 @@ var ThemesLoader = nunjucks.Loader.extend({
};
},
- /*
- Nunjucks calls "isRelative" to determine when to call "resolve".
- We handle absolute paths ourselves in ".resolve" so we always return true
- */
+ /**
+ * Nunjucks calls "isRelative" to determine when to call "resolve".
+ * We handle absolute paths ourselves in ".resolve" so we always return true
+ */
isRelative: function() {
return true;
},
- /*
- Get original search path containing a template
- @param {String} filepath
- @return {String} searchPath
- */
+ /**
+ * Get original search path containing a template
+ * @param {String} filepath
+ * @return {String} searchPath
+ */
getSearchPath: function(filepath) {
return this.searchPaths
.sortBy(function(s) {
@@ -63,22 +63,22 @@ var ThemesLoader = nunjucks.Loader.extend({
});
},
- /*
- Get template name from a filepath
- @param {String} filepath
- @return {String} name
- */
+ /**
+ * Get template name from a filepath
+ * @param {String} filepath
+ * @return {String} name
+ */
getTemplateName: function(filepath) {
var originalSearchPath = this.getSearchPath(filepath);
return originalSearchPath? path.relative(originalSearchPath, filepath) : null;
},
- /*
- Resolve a template from a current template
- @param {String|null} from
- @param {String} to
- @return {String|null}
- */
+ /**
+ * Resolve a template from a current template
+ * @param {String|null} from
+ * @param {String} to
+ * @return {String|null}
+ */
resolve: function(from, to) {
var searchPaths = this.searchPaths;