arch-wiki-man/lib/util.js

12 lines
305 B
JavaScript
Raw Normal View History

2016-01-30 15:11:55 +00:00
'use strict';
var path = require('path');
2016-02-02 12:57:05 +00:00
var archWiki = require.resolve('arch-wiki-md-repo');
2016-01-30 15:11:55 +00:00
exports.getArticlePath = getArticlePath;
function getArticlePath(relativeArticlePath) {
2016-02-02 12:57:05 +00:00
var absoluteArticlePath = path.resolve(archWiki, '..', 'wiki', relativeArticlePath);
2016-01-30 15:11:55 +00:00
return absoluteArticlePath;
}