Files
vuepress/packages/@vuepress/shared-utils/lib/toAbsolutePath.js
T
ULIVZ 3871f4a1a3 feat: cache option (boolean | absolute path | relative path)
It also close #993 via including siteConfig.extendMarkdown & siteConfig.markdown.extendMarkdown to cacheIdentifier.
2018-11-13 23:45:26 +08:00

19 lines
284 B
JavaScript

'use strict'
/**
* Module dependencies.
*/
const path = require('upath')
/**
* Normalize path request to absolute path.
*/
module.exports = function toAbsolutePath (raw, cwd = process.cwd()) {
if (path.isAbsolute(raw)) {
return raw
}
return path.resolve(cwd, raw)
}