Skip to content

Instantly share code, notes, and snippets.

@kanonji
Last active December 31, 2015 01:39
Show Gist options
  • Save kanonji/7915086 to your computer and use it in GitHub Desktop.
Save kanonji/7915086 to your computer and use it in GitHub Desktop.
var tag_helpers = {
relative_path: function(basePath) { // I want basePath in this scope.
var pathDepth = basePath.split('/').length -2;
var path = new Array(pathDepth + 1).join('../');
return path;
}
};
module.exports = {
get: function(basePath, file_extension, options, callback){
return callback(null, { "tag": tag_helpers }, {}, new Date());
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment