Skip to content

Instantly share code, notes, and snippets.

@laktek
Forked from kanonji/relative_path_helper.js
Last active December 31, 2015 02:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laktek/7919236 to your computer and use it in GitHub Desktop.
Save laktek/7919236 to your computer and use it in GitHub Desktop.
var generate_tag_helpers_with_basepath = function(basePath) {
return {
relative_path: function() {
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": generate_tag_helpers_with_basepath(basePath) }, {}, new Date());
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment