We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c84eaa8 commit da8611eCopy full SHA for da8611e
lib/api/encodeGlobal.js
@@ -1,3 +1,4 @@
1
+var path = require('path');
2
var Promise = require('../utils/promise');
3
var PathUtils = require('../utils/path');
4
var fs = require('../utils/fs');
@@ -67,6 +68,16 @@ function encodeGlobal(output) {
67
68
return bookFS.readAsString(fileName);
69
},
70
71
+ /**
72
+ Resolve a file from the book root
73
+
74
+ @param {String} fileName
75
+ @return {String}
76
+ */
77
+ resolve: function(fileName) {
78
+ return path.resolve(book.getContentRoot(), fileName);
79
+ },
80
81
template: {
82
/**
83
Apply a templating block and returns its result
0 commit comments