UNPKG

317 BJavaScriptView Raw
1const path = require('path')
2
3module.exports.isLocalPath = function (templatePath) {
4 return /^[./]|(^[a-zA-Z]:)/.test(templatePath)
5}
6
7module.exports.getTemplatePath = function (templatePath) {
8 return path.isAbsolute(templatePath)
9 ? templatePath
10 : path.normalize(path.join(process.cwd(), templatePath))
11}